openapi: 3.0.3
info:
  title: Infraspeak Public REST API
  description: Infraspeak public REST API documentation.
  version: 3.0.0
  contact:
    name: Infraspeak
    url: https://infraspeak.com
servers:
  - url: https://api.infraspeak.com/v3
    description: Production
tags:
  - name: Buy Orders
    description: Buy Orders related endpoints
  - name: Categories
    description: Categories related endpoints
  - name: Clients
    description: clients related endpoints
  - name: Contacts
    description: contacts related endpoints
  - name: Cost Centers
    description: Cost Centers related endpoints
  - name: Elements
    description: Elements (Assets) related endpoints
  - name: Failures
    description: Failures (Work Orders) related endpoints
  - name: Files
    description: Files related endpoints
  - name: Locations
    description: Locations related endpoints
  - name: Materials
    description: Materials related endpoints
  - name: Operators
    description: Operators related endpoints
  - name: Other Costs
    description: Other Costs related endpoints
  - name: Problems
    description: Problems related endpoints
  - name: Quotes
    description: Quote related endpoints
  - name: Requests
    description: Requests related endpoints
  - name: Scheduled Works
    description: Scheduled Works related endpoints
  - name: Sell Orders
    description: Sell Orders related endpoints
  - name: Stock Movements
    description: Stock Movements related endpoints
  - name: Stocks
    description: Stock related endpoints
  - name: Suppliers
    description: Suppliers related endpoints
  - name: Warehouses
    description: warehouses related endpoints
  - name: Works
    description: Work and ScheduleWork related endpoints
paths:
  /categories:
    get:
      operationId: getCategories
      tags:
        - Categories
      summary: List 'folder-like' Categories
      description: >
        This endpoint allows you to list main 'folder' categories.


        The query parameters described below are to be used with the
        [JQL](../../../../../../../docs/api/.markdown/1.introduction/4-parameters.md).
      parameters:
        - name: code
          in: query
          description: Filter results by given property value.
          schema:
            type: string
        - name: limit
          in: query
          description: Number of categories per page (defaults to no pagination).
          schema:
            type: integer
            minimum: 1
        - name: page
          in: query
          description: Page number for pagination (defaults to no page).
          schema:
            type: integer
            minimum: 1
        - name: expanded
          in: query
          description: |
            Comma-separated list of relations to include in the response.
            Allowed values: characteristics,
                      characteristics.characteristic_catalog,
                      Characteristics,
                      characteristics.characteristicCatalog,
                      categoryMeterings,
                      entity,
                      files,
                      maintenancePolicies,
                      maintenanceProcedures,
                      maintenanceProcedures.categoryMetering,
                      technicalSkills,
            .
          schema:
            type: string
        - name: sort
          in: query
          description: |
            Sort results by one or more fields. Allowed fields: full_code, name, is_real.
          schema:
            type: string
        - name: s_full_code
          in: query
          description: Filter by full code (exact match).
          schema:
            type: string
        - name: s_full_code_like
          in: query
          description: Filter by full code (partial match).
          schema:
            type: string
        - name: s_name
          in: query
          description: Filter by category name.
          schema:
            type: string
        - name: s_name_like
          in: query
          description: Filter by category name (partial match).
          schema:
            type: string
        - name: s_type
          in: query
          description: Filter by category type.
          schema:
            type: string
        - name: s_category_id
          in: query
          description: Filter by category id.
          schema:
            type: integer
        - name: s_code
          in: query
          description: Filter by category code (exact match).
          schema:
            type: string
        - name: s_code_like
          in: query
          description: Filter by category code (partial match).
          schema:
            type: string
        - name: s_characteristics-characteristic_id
          in: query
          description: Filter by related characteristics id.
          schema:
            type: string
        - name: s_characteristics-name
          in: query
          description: Filter by related characteristics name.
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      title: Category
                      description: Category model structure details
                      type: object
                      properties:
                        id:
                          description: ID of the Category
                          type: string
                          examples:
                            - '123'
                          readOnly: true
                        type:
                          description: Model type
                          type: string
                          enum:
                            - category
                          examples:
                            - category
                          readOnly: true
                        attributes:
                          type: object
                          properties:
                            category_id:
                              description: ID of the Category
                              type: integer
                              examples:
                                - 123
                              readOnly: true
                            type:
                              description: >-
                                The Category type. A "TYPE_OF_EQUIPMENT" Category is directly related to equipments
                                (e.g. a fridge) and a Category "SOFT_MAINTENANCE" is related to Locations (E.g. hotel
                                rooms).
                              type: string
                              enum:
                                - SOFT_MAINTENANCE
                                - TYPE_OF_EQUIPMENT
                              examples:
                                - SOFT_MAINTENANCE
                            all_technical_skills:
                              description: Indicates if this category is associated to all technical skills.
                              type:
                                - boolean
                                - 'null'
                              examples:
                                - true
                            code:
                              description: Code of the Category.
                              type: string
                              examples:
                                - VENT
                            entity_id:
                              description: Entity ID of the Category.
                              type: integer
                              examples:
                                - 123
                            full_code:
                              description: Codes of the category's parents concatenated by dot with category code.
                              type:
                                - string
                                - 'null'
                              examples:
                                - XYZ.VENT
                              readOnly: true
                            has_children:
                              description: Whether the category has subitems or not.
                              type: boolean
                              examples:
                                - true
                              readOnly: true
                            is_real:
                              description: Whether the category is a folder (false) or "final" category (true).
                              type:
                                - boolean
                                - 'null'
                              examples:
                                - true
                            name:
                              description: Name of the Category.
                              type: string
                              examples:
                                - Ventilation
                            parent_id:
                              description: ID of the category parent.
                              type:
                                - integer
                                - 'null'
                              examples:
                                - 123
                        relationships:
                          description: Available relationships of the Category.
                          type: object
                          properties:
                            categoryMeterings:
                              description: Category Meterings associated to the category.
                              type: object
                            characteristics:
                              description: Characteristics associated to the category.
                              type: object
                            entity:
                              description: Entity associated to the category.
                              type: object
                            files:
                              description: Files associated to the category.
                              type: object
                            maintenanceProcedures:
                              description: Maintenance Procedures associated to the category.
                              type: object
                            maintenancePolicies:
                              description: Maintenance Policies associated to the category.
                              type: object
                            problems:
                              description: Problems associated to the category.
                              type: object
                            technicalSkills:
                              description: Technical Skills associated to the category.
                              type: object
                      required:
                        - id
                        - type
                        - attributes
              examples:
                Example:
                  value:
                    data:
                      - type: category
                        id: '90540'
                        attributes:
                          category_id: 90540
                          type: TYPE_OF_EQUIPMENT
                          has_children: false
                          name: Centrifugal Pumps
                          code: '03'
                          full_code: SFG20.45.03
                          parent_id: 90537
                          entity_id: 12
                          is_real: true
                          all_technical_skills: true
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '403':
          description: Forbidden. The action can not be fulfilled.
          content:
            application/json:
              schema:
                title: 403 Forbidden
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 403
                      message:
                        type: string
                        examples:
                          - Action unauthorized
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 403
                      message: Action unauthorized
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
    post:
      operationId: createCategory
      tags:
        - Categories
      summary: Create a Category
      description: This endpoint allows you to create a Category.
      requestBody:
        content:
          application/json:
            schema:
              description: Create Category payload
              type: object
              properties:
                type:
                  description: >-
                    The Category type. A "TYPE_OF_EQUIPMENT" Category is directly related to equipments (e.g. a fridge)
                    and a Category "SOFT_MAINTENANCE" is related to Locations (E.g. hotel rooms).
                  type: string
                  enum:
                    - TYPE_OF_EQUIPMENT
                    - SOFT_MAINTENANCE
                  examples:
                    - TYPE_OF_EQUIPMENT
                code:
                  description: Category code. Must be unique across the same "level".
                  type: string
                  examples:
                    - VENT
                is_real:
                  description: >-
                    Whether the Category is "folder-like" (false) or a final category (true). Required if `type` is
                    "TYPE_OF_EQUIPMENT".
                  type: boolean
                  examples:
                    - true
                name:
                  description: Category name. Must be unique across the same "level".
                  type: string
                  examples:
                    - Ventilation
                parent_id:
                  description: Parent ID of Category. Required if `is_real` is "true".
                  type:
                    - integer
                    - 'null'
                  examples:
                    - 123
              required:
                - type
                - name
                - code
                - is_real
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: Category
                    description: Category model structure details
                    type: object
                    properties:
                      id:
                        description: ID of the Category
                        type: string
                        examples:
                          - '123'
                        readOnly: true
                      type:
                        description: Model type
                        type: string
                        enum:
                          - category
                        examples:
                          - category
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          category_id:
                            description: ID of the Category
                            type: integer
                            examples:
                              - 123
                            readOnly: true
                          type:
                            description: >-
                              The Category type. A "TYPE_OF_EQUIPMENT" Category is directly related to equipments (e.g.
                              a fridge) and a Category "SOFT_MAINTENANCE" is related to Locations (E.g. hotel rooms).
                            type: string
                            enum:
                              - SOFT_MAINTENANCE
                              - TYPE_OF_EQUIPMENT
                            examples:
                              - SOFT_MAINTENANCE
                          all_technical_skills:
                            description: Indicates if this category is associated to all technical skills.
                            type:
                              - boolean
                              - 'null'
                            examples:
                              - true
                          code:
                            description: Code of the Category.
                            type: string
                            examples:
                              - VENT
                          entity_id:
                            description: Entity ID of the Category.
                            type: integer
                            examples:
                              - 123
                          full_code:
                            description: Codes of the category's parents concatenated by dot with category code.
                            type:
                              - string
                              - 'null'
                            examples:
                              - XYZ.VENT
                            readOnly: true
                          has_children:
                            description: Whether the category has subitems or not.
                            type: boolean
                            examples:
                              - true
                            readOnly: true
                          is_real:
                            description: Whether the category is a folder (false) or "final" category (true).
                            type:
                              - boolean
                              - 'null'
                            examples:
                              - true
                          name:
                            description: Name of the Category.
                            type: string
                            examples:
                              - Ventilation
                          parent_id:
                            description: ID of the category parent.
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 123
                      relationships:
                        description: Available relationships of the Category.
                        type: object
                        properties:
                          categoryMeterings:
                            description: Category Meterings associated to the category.
                            type: object
                          characteristics:
                            description: Characteristics associated to the category.
                            type: object
                          entity:
                            description: Entity associated to the category.
                            type: object
                          files:
                            description: Files associated to the category.
                            type: object
                          maintenanceProcedures:
                            description: Maintenance Procedures associated to the category.
                            type: object
                          maintenancePolicies:
                            description: Maintenance Policies associated to the category.
                            type: object
                          problems:
                            description: Problems associated to the category.
                            type: object
                          technicalSkills:
                            description: Technical Skills associated to the category.
                            type: object
                    required:
                      - id
                      - type
                      - attributes
              examples:
                Example:
                  value:
                    data:
                      type: category
                      id: '90540'
                      attributes:
                        category_id: 90540
                        type: TYPE_OF_EQUIPMENT
                        has_children: false
                        name: Centrifugal Pumps
                        code: '03'
                        full_code: SFG20.45.03
                        parent_id: 90537
                        entity_id: 12
                        is_real: true
                        all_technical_skills: true
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '403':
          description: Forbidden. The action can not be fulfilled.
          content:
            application/json:
              schema:
                title: 403 Forbidden
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 403
                      message:
                        type: string
                        examples:
                          - Action unauthorized
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 403
                      message: Action unauthorized
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /categories/all:
    get:
      operationId: getAllCategories
      tags:
        - Categories
      summary: List all categories
      description: >
        This endpoint allows you to list all categories.


        The query parameters described below are to be used with the
        [JQL](../../../../../../../docs/api/.markdown/1.introduction/4-parameters.md).
      parameters:
        - name: code
          in: query
          description: Filter results by given property value.
          schema:
            type: string
        - name: limit
          in: query
          description: Number of categories per page (defaults to no pagination).
          schema:
            type: integer
            minimum: 1
        - name: page
          in: query
          description: Page number for pagination (defaults to no page).
          schema:
            type: integer
            minimum: 1
        - name: expanded
          in: query
          description: |
            Comma-separated list of relations to include in the response.
            Allowed values: characteristics,
                      characteristics.characteristic_catalog,
                      Characteristics,
                      characteristics.characteristicCatalog,
                      categoryMeterings,
                      entity,
                      files,
                      maintenancePolicies,
                      maintenanceProcedures,
                      maintenanceProcedures.categoryMetering,
                      technicalSkills,
            .
          schema:
            type: string
        - name: sort
          in: query
          description: |
            Sort results by one or more fields. Allowed fields: full_code, name, is_real.
          schema:
            type: string
        - name: filteredByTechnicalSkills
          in: query
          description: When true, returns only categories assignable to technical skills along with their ancestors.
          deprecated: true
          schema:
            type: boolean
        - name: s_is_real
          in: query
          description: Filter by whether the category is real.
          schema:
            type: boolean
        - name: s_name
          in: query
          description: Filter by category name.
          schema:
            type: string
        - name: s_name_like
          in: query
          description: Filter by category name (partial match).
          schema:
            type: string
        - name: s_type
          in: query
          description: Filter by category type.
          schema:
            type: string
        - name: s_code
          in: query
          description: Filter by category code (exact match).
          schema:
            type: string
        - name: s_code_like
          in: query
          description: Filter by category code (partial match).
          schema:
            type: string
        - name: s_code_in
          in: query
          description: Filter by multiple category codes.
          schema:
            type: array
            items:
              type: string
        - name: s_full_code
          in: query
          description: Filter by full code (exact match).
          schema:
            type: string
        - name: s_full_code_like
          in: query
          description: Filter by full code (partial match).
          schema:
            type: string
        - name: s_full_code_in
          in: query
          description: Filter by multiple category full codes.
          schema:
            type: array
            items:
              type: string
        - name: s_category_id
          in: query
          description: Filter by category id.
          schema:
            type: integer
        - name: s_category_id_in
          in: query
          description: Filter by multiple category ids.
          schema:
            type: array
            items:
              type: integer
        - name: s_parent_id
          in: query
          description: Filter by parent category id.
          schema:
            type: integer
        - name: s_parent_id_in
          in: query
          description: Filter by multiple parent category ids.
          schema:
            type: array
            items:
              type: integer
        - name: s_problems-problem_id
          in: query
          description: Filter by associated problem id.
          schema:
            type: integer
        - name: date_min_updated_at
          in: query
          description: Filter categories updated at or after this date.
          schema:
            type: string
            format: date-time
        - name: date_max_updated_at
          in: query
          description: Filter categories updated at or before this date.
          schema:
            type: string
            format: date-time
        - name: sc_min_id
          in: query
          description: Filter categories with id greater than or equal to this value.
          schema:
            type: integer
        - name: sc_search
          in: query
          description: Search categories by name or full code.
          schema:
            type: string
        - name: sc_type_equipment
          in: query
          description: Filter to only return equipment type categories.
          schema:
            type: boolean
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      title: Category
                      description: Category model structure details
                      type: object
                      properties:
                        id:
                          description: ID of the Category
                          type: string
                          examples:
                            - '123'
                          readOnly: true
                        type:
                          description: Model type
                          type: string
                          enum:
                            - category
                          examples:
                            - category
                          readOnly: true
                        attributes:
                          type: object
                          properties:
                            category_id:
                              description: ID of the Category
                              type: integer
                              examples:
                                - 123
                              readOnly: true
                            type:
                              description: >-
                                The Category type. A "TYPE_OF_EQUIPMENT" Category is directly related to equipments
                                (e.g. a fridge) and a Category "SOFT_MAINTENANCE" is related to Locations (E.g. hotel
                                rooms).
                              type: string
                              enum:
                                - SOFT_MAINTENANCE
                                - TYPE_OF_EQUIPMENT
                              examples:
                                - SOFT_MAINTENANCE
                            all_technical_skills:
                              description: Indicates if this category is associated to all technical skills.
                              type:
                                - boolean
                                - 'null'
                              examples:
                                - true
                            code:
                              description: Code of the Category.
                              type: string
                              examples:
                                - VENT
                            entity_id:
                              description: Entity ID of the Category.
                              type: integer
                              examples:
                                - 123
                            full_code:
                              description: Codes of the category's parents concatenated by dot with category code.
                              type:
                                - string
                                - 'null'
                              examples:
                                - XYZ.VENT
                              readOnly: true
                            has_children:
                              description: Whether the category has subitems or not.
                              type: boolean
                              examples:
                                - true
                              readOnly: true
                            is_real:
                              description: Whether the category is a folder (false) or "final" category (true).
                              type:
                                - boolean
                                - 'null'
                              examples:
                                - true
                            name:
                              description: Name of the Category.
                              type: string
                              examples:
                                - Ventilation
                            parent_id:
                              description: ID of the category parent.
                              type:
                                - integer
                                - 'null'
                              examples:
                                - 123
                        relationships:
                          description: Available relationships of the Category.
                          type: object
                          properties:
                            categoryMeterings:
                              description: Category Meterings associated to the category.
                              type: object
                            characteristics:
                              description: Characteristics associated to the category.
                              type: object
                            entity:
                              description: Entity associated to the category.
                              type: object
                            files:
                              description: Files associated to the category.
                              type: object
                            maintenanceProcedures:
                              description: Maintenance Procedures associated to the category.
                              type: object
                            maintenancePolicies:
                              description: Maintenance Policies associated to the category.
                              type: object
                            problems:
                              description: Problems associated to the category.
                              type: object
                            technicalSkills:
                              description: Technical Skills associated to the category.
                              type: object
                      required:
                        - id
                        - type
                        - attributes
              examples:
                Example:
                  value:
                    data:
                      - type: category
                        id: '90540'
                        attributes:
                          category_id: 90540
                          type: TYPE_OF_EQUIPMENT
                          has_children: false
                          name: Centrifugal Pumps
                          code: '03'
                          full_code: SFG20.45.03
                          parent_id: 90537
                          entity_id: 12
                          is_real: true
                          all_technical_skills: true
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '403':
          description: Forbidden. The action can not be fulfilled.
          content:
            application/json:
              schema:
                title: 403 Forbidden
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 403
                      message:
                        type: string
                        examples:
                          - Action unauthorized
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 403
                      message: Action unauthorized
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /categories/{category}:
    get:
      operationId: getCategory
      tags:
        - Categories
      summary: Get a Category
      description: >
        This endpoint allows you to get one Category.


        The query parameters described below are to be used with the
        [JQL](../../../../../../../docs/api/.markdown/1.introduction/4-parameters.md).
      parameters:
        - name: category
          in: path
          description: The ID of the Category
          required: true
          schema:
            type: string
        - name: expanded
          in: query
          description: |
            Comma-separated list of relations to include in the response.
            Allowed values: technicalSkills,
                      characteristics,
                      categoryMeterings,
                      category_meterings,
                      characteristics.catalog,
                      maintenancePolicies,
                      maintenance_procedures,
                      maintenanceProcedures,
                      maintenanceProcedures.categoryMetering,
                      entity,
                      files,
                      problems.
          schema:
            type: string
        - name: sort
          in: query
          description: |
            Sort results by one or more fields. Allowed fields: full_code.
            Use a comma-separated list for multiple sorts and prefix a field with "-" for descending order.
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: Category
                    description: Category model structure details
                    type: object
                    properties:
                      id:
                        description: ID of the Category
                        type: string
                        examples:
                          - '123'
                        readOnly: true
                      type:
                        description: Model type
                        type: string
                        enum:
                          - category
                        examples:
                          - category
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          category_id:
                            description: ID of the Category
                            type: integer
                            examples:
                              - 123
                            readOnly: true
                          type:
                            description: >-
                              The Category type. A "TYPE_OF_EQUIPMENT" Category is directly related to equipments (e.g.
                              a fridge) and a Category "SOFT_MAINTENANCE" is related to Locations (E.g. hotel rooms).
                            type: string
                            enum:
                              - SOFT_MAINTENANCE
                              - TYPE_OF_EQUIPMENT
                            examples:
                              - SOFT_MAINTENANCE
                          all_technical_skills:
                            description: Indicates if this category is associated to all technical skills.
                            type:
                              - boolean
                              - 'null'
                            examples:
                              - true
                          code:
                            description: Code of the Category.
                            type: string
                            examples:
                              - VENT
                          entity_id:
                            description: Entity ID of the Category.
                            type: integer
                            examples:
                              - 123
                          full_code:
                            description: Codes of the category's parents concatenated by dot with category code.
                            type:
                              - string
                              - 'null'
                            examples:
                              - XYZ.VENT
                            readOnly: true
                          has_children:
                            description: Whether the category has subitems or not.
                            type: boolean
                            examples:
                              - true
                            readOnly: true
                          is_real:
                            description: Whether the category is a folder (false) or "final" category (true).
                            type:
                              - boolean
                              - 'null'
                            examples:
                              - true
                          name:
                            description: Name of the Category.
                            type: string
                            examples:
                              - Ventilation
                          parent_id:
                            description: ID of the category parent.
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 123
                      relationships:
                        description: Available relationships of the Category.
                        type: object
                        properties:
                          categoryMeterings:
                            description: Category Meterings associated to the category.
                            type: object
                          characteristics:
                            description: Characteristics associated to the category.
                            type: object
                          entity:
                            description: Entity associated to the category.
                            type: object
                          files:
                            description: Files associated to the category.
                            type: object
                          maintenanceProcedures:
                            description: Maintenance Procedures associated to the category.
                            type: object
                          maintenancePolicies:
                            description: Maintenance Policies associated to the category.
                            type: object
                          problems:
                            description: Problems associated to the category.
                            type: object
                          technicalSkills:
                            description: Technical Skills associated to the category.
                            type: object
                    required:
                      - id
                      - type
                      - attributes
              examples:
                Example:
                  value:
                    data:
                      type: category
                      id: '90540'
                      attributes:
                        category_id: 90540
                        type: TYPE_OF_EQUIPMENT
                        has_children: false
                        name: Centrifugal Pumps
                        code: '03'
                        full_code: SFG20.45.03
                        parent_id: 90537
                        entity_id: 12
                        is_real: true
                        all_technical_skills: true
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '403':
          description: Forbidden. The action can not be fulfilled.
          content:
            application/json:
              schema:
                title: 403 Forbidden
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 403
                      message:
                        type: string
                        examples:
                          - Action unauthorized
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 403
                      message: Action unauthorized
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
    delete:
      operationId: deleteCategory
      tags:
        - Categories
      summary: Delete a Category
      description: This endpoint allows you to delete a Category.
      parameters:
        - name: category
          in: path
          description: The ID of the Category
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items: {}
                  status:
                    type: string
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '403':
          description: Forbidden. The action can not be fulfilled.
          content:
            application/json:
              schema:
                title: 403 Forbidden
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 403
                      message:
                        type: string
                        examples:
                          - Action unauthorized
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 403
                      message: Action unauthorized
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '409':
          description: Server conflicts. Data constraint violations or concurrent modification exceptions occurred.
          content:
            application/json:
              schema:
                title: 409 Server conflicts
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 409
                      message:
                        type: string
                        examples:
                          - Data constraint violations or concurrent modification exceptions
                      more_info:
                        type: string
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
    patch:
      operationId: updateCategory
      tags:
        - Categories
      summary: Update a Category
      description: >
        This endpoint allows you to update a Category.

        Have in mind that you cannot change a Category's `type`. E.g.: change a Category of type `TYPE_OF_EQUIPMENT` to
        `SOFT_MAINTENANCE`.


        Changing the `all_technical_skills` field is restricted to admin operators; any other operator receives a `403`
        response.
      parameters:
        - name: category
          in: path
          description: The ID of the Category
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              description: Patch Category payload
              type: object
              properties:
                name:
                  description: Category name. Must be unique across the same "level".
                  type: string
                  examples:
                    - Ventilation
                code:
                  description: Category code. Must be unique across the same "level".
                  type: string
                  examples:
                    - VENT
                parent_id:
                  description: Parent ID of Category
                  type:
                    - integer
                    - 'null'
                  examples:
                    - 123
                all_technical_skills:
                  description: >-
                    Whether the category accepts operators with any technical skill. Only admin operators may change
                    this field; any other operator receives a `403` response.
                  type: boolean
                  examples:
                    - true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: Category
                    description: Category model structure details
                    type: object
                    properties:
                      id:
                        description: ID of the Category
                        type: string
                        examples:
                          - '123'
                        readOnly: true
                      type:
                        description: Model type
                        type: string
                        enum:
                          - category
                        examples:
                          - category
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          category_id:
                            description: ID of the Category
                            type: integer
                            examples:
                              - 123
                            readOnly: true
                          type:
                            description: >-
                              The Category type. A "TYPE_OF_EQUIPMENT" Category is directly related to equipments (e.g.
                              a fridge) and a Category "SOFT_MAINTENANCE" is related to Locations (E.g. hotel rooms).
                            type: string
                            enum:
                              - SOFT_MAINTENANCE
                              - TYPE_OF_EQUIPMENT
                            examples:
                              - SOFT_MAINTENANCE
                          all_technical_skills:
                            description: Indicates if this category is associated to all technical skills.
                            type:
                              - boolean
                              - 'null'
                            examples:
                              - true
                          code:
                            description: Code of the Category.
                            type: string
                            examples:
                              - VENT
                          entity_id:
                            description: Entity ID of the Category.
                            type: integer
                            examples:
                              - 123
                          full_code:
                            description: Codes of the category's parents concatenated by dot with category code.
                            type:
                              - string
                              - 'null'
                            examples:
                              - XYZ.VENT
                            readOnly: true
                          has_children:
                            description: Whether the category has subitems or not.
                            type: boolean
                            examples:
                              - true
                            readOnly: true
                          is_real:
                            description: Whether the category is a folder (false) or "final" category (true).
                            type:
                              - boolean
                              - 'null'
                            examples:
                              - true
                          name:
                            description: Name of the Category.
                            type: string
                            examples:
                              - Ventilation
                          parent_id:
                            description: ID of the category parent.
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 123
                      relationships:
                        description: Available relationships of the Category.
                        type: object
                        properties:
                          categoryMeterings:
                            description: Category Meterings associated to the category.
                            type: object
                          characteristics:
                            description: Characteristics associated to the category.
                            type: object
                          entity:
                            description: Entity associated to the category.
                            type: object
                          files:
                            description: Files associated to the category.
                            type: object
                          maintenanceProcedures:
                            description: Maintenance Procedures associated to the category.
                            type: object
                          maintenancePolicies:
                            description: Maintenance Policies associated to the category.
                            type: object
                          problems:
                            description: Problems associated to the category.
                            type: object
                          technicalSkills:
                            description: Technical Skills associated to the category.
                            type: object
                    required:
                      - id
                      - type
                      - attributes
              examples:
                Example:
                  value:
                    data:
                      type: category
                      id: '90540'
                      attributes:
                        category_id: 90540
                        type: TYPE_OF_EQUIPMENT
                        has_children: false
                        name: Centrifugal Pumps
                        code: '03'
                        full_code: SFG20.45.03
                        parent_id: 90537
                        entity_id: 12
                        is_real: true
                        all_technical_skills: true
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '403':
          description: Forbidden. The action can not be fulfilled.
          content:
            application/json:
              schema:
                title: 403 Forbidden
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 403
                      message:
                        type: string
                        examples:
                          - Action unauthorized
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 403
                      message: Action unauthorized
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /categories/{category}/children:
    get:
      operationId: getCategoryChildren
      tags:
        - Categories
      summary: List all Category's children
      description: >
        This endpoint allows you to get lower level categories of a specific Category.


        The query parameters described below are to be used with the
        [JQL](../../../../../../../docs/api/.markdown/1.introduction/4-parameters.md).
      parameters:
        - name: category
          in: path
          description: The ID of the Category
          required: true
          schema:
            type: string
        - name: code
          in: query
          description: Filter results by given property value.
          schema:
            type: string
        - name: limit
          in: query
          description: Number of categories per page (defaults to no pagination).
          schema:
            type: integer
            minimum: 1
        - name: page
          in: query
          description: Page number for pagination (defaults to no page).
          schema:
            type: integer
            minimum: 1
        - name: expanded
          in: query
          description: |
            Comma-separated list of relations to include in the response.
            Allowed values: characteristics, problems.
          schema:
            type: string
        - name: sort
          in: query
          description: |
            Sort results by one or more fields. Allowed fields: full_code, is_real, name.
            Use a comma-separated list for multiple sorts and prefix a field with "-" for descending order.
          schema:
            type: string
        - name: s_type
          in: query
          description: Filter by category type.
          schema:
            type: string
        - name: s_is_real
          in: query
          description: Filter by whether the category is real.
          schema:
            type: boolean
        - name: empty_folders
          in: query
          description: When set to true, includes categories that have no children (empty folders) in the response.
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      title: Category
                      description: Category model structure details
                      type: object
                      properties:
                        id:
                          description: ID of the Category
                          type: string
                          examples:
                            - '123'
                          readOnly: true
                        type:
                          description: Model type
                          type: string
                          enum:
                            - category
                          examples:
                            - category
                          readOnly: true
                        attributes:
                          type: object
                          properties:
                            category_id:
                              description: ID of the Category
                              type: integer
                              examples:
                                - 123
                              readOnly: true
                            type:
                              description: >-
                                The Category type. A "TYPE_OF_EQUIPMENT" Category is directly related to equipments
                                (e.g. a fridge) and a Category "SOFT_MAINTENANCE" is related to Locations (E.g. hotel
                                rooms).
                              type: string
                              enum:
                                - SOFT_MAINTENANCE
                                - TYPE_OF_EQUIPMENT
                              examples:
                                - SOFT_MAINTENANCE
                            all_technical_skills:
                              description: Indicates if this category is associated to all technical skills.
                              type:
                                - boolean
                                - 'null'
                              examples:
                                - true
                            code:
                              description: Code of the Category.
                              type: string
                              examples:
                                - VENT
                            entity_id:
                              description: Entity ID of the Category.
                              type: integer
                              examples:
                                - 123
                            full_code:
                              description: Codes of the category's parents concatenated by dot with category code.
                              type:
                                - string
                                - 'null'
                              examples:
                                - XYZ.VENT
                              readOnly: true
                            has_children:
                              description: Whether the category has subitems or not.
                              type: boolean
                              examples:
                                - true
                              readOnly: true
                            is_real:
                              description: Whether the category is a folder (false) or "final" category (true).
                              type:
                                - boolean
                                - 'null'
                              examples:
                                - true
                            name:
                              description: Name of the Category.
                              type: string
                              examples:
                                - Ventilation
                            parent_id:
                              description: ID of the category parent.
                              type:
                                - integer
                                - 'null'
                              examples:
                                - 123
                        relationships:
                          description: Available relationships of the Category.
                          type: object
                          properties:
                            categoryMeterings:
                              description: Category Meterings associated to the category.
                              type: object
                            characteristics:
                              description: Characteristics associated to the category.
                              type: object
                            entity:
                              description: Entity associated to the category.
                              type: object
                            files:
                              description: Files associated to the category.
                              type: object
                            maintenanceProcedures:
                              description: Maintenance Procedures associated to the category.
                              type: object
                            maintenancePolicies:
                              description: Maintenance Policies associated to the category.
                              type: object
                            problems:
                              description: Problems associated to the category.
                              type: object
                            technicalSkills:
                              description: Technical Skills associated to the category.
                              type: object
                      required:
                        - id
                        - type
                        - attributes
                  meta:
                    title: Meta
                    description: Meta model structure details
                    type: object
                    properties:
                      pagination:
                        type: object
                        properties:
                          total:
                            description: Total items.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          count:
                            description: Total items returned for the current page.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          per_page:
                            description: Maximum number of records per page.
                            type: integer
                            minimum: 1
                            default: 200
                            examples:
                              - 1
                          current_page:
                            description: Number of the current page.
                            type: integer
                            minimum: 1
                            default: 1
                          total_pages:
                            description: Number of the total pages.
                            type: integer
                            minimum: 1
                            default: 1
                        required:
                          - total
                          - count
                          - per_page
                          - current_page
                          - total_pages
                  links:
                    title: Response Links on listing operations
                    description: >-
                      Requests that return multiple items include a `links` attribute, with links related to request's
                      context.
                    type: object
                    properties:
                      self:
                        description: Current response link.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      first:
                        description: Link to the first page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      last:
                        description: Link to the previous page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      next:
                        description: Link to the next page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                    required:
                      - self
                      - first
                      - last
              examples:
                Example:
                  value:
                    data:
                      - type: category
                        id: '90540'
                        attributes:
                          category_id: 90540
                          type: TYPE_OF_EQUIPMENT
                          has_children: false
                          name: Centrifugal Pumps
                          code: '03'
                          full_code: SFG20.45.03
                          parent_id: 90537
                          entity_id: 12
                          is_real: true
                          all_technical_skills: true
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '403':
          description: Forbidden. The action can not be fulfilled.
          content:
            application/json:
              schema:
                title: 403 Forbidden
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 403
                      message:
                        type: string
                        examples:
                          - Action unauthorized
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 403
                      message: Action unauthorized
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /clients:
    get:
      operationId: getClients
      tags:
        - Clients
      summary: List all Clients
      description: >
        This endpoint allows you to get all Clients.


        The query parameters described below are to be used with the
        [JQL](../../../../../../../docs/api/.markdown/1.introduction/4-parameters.md).
      parameters:
        - name: code
          in: query
          description: Filter results by given property value
          schema:
            type: string
        - name: name
          in: query
          description: Filter results by given property value
          schema:
            type: string
        - name: client_id
          in: query
          description: Filter results by given property value
          schema:
            type: integer
        - name: nif
          in: query
          description: Filter results by given property value
          schema:
            type: string
        - name: sort
          in: query
          description: |
            Field to sort by. Add `-` to sort descending.

            Supported values:
            - `name`
            - `code`
            - `nif`
            - `location` (sorts by city if present, else by country)

            Examples:
            - `order=name` (ascending)
            - `order=location-` (descending)
          required: false
          schema:
            type: string
            pattern: ^(name|code|nif|location)(-)?$
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      title: Clients
                      description: Client model structure details
                      type: object
                      properties:
                        id:
                          description: ID of the Client
                          type: string
                          examples:
                            - '123'
                          readOnly: true
                        type:
                          description: Model type
                          type: string
                          enum:
                            - client
                          examples:
                            - client
                          readOnly: true
                        attributes:
                          type: object
                          properties:
                            client_id:
                              description: ID of the Client
                              type: integer
                              examples:
                                - 123
                            client_uuid:
                              description: UUID of the Client
                              type: string
                              format: uuid
                              examples:
                                - e632afe8-a1bf-4702-b5bd-b1163861ba51
                            name:
                              description: Client Name
                              type: string
                              examples:
                                - John Doe
                            code:
                              description: Client Code
                              type:
                                - string
                                - 'null'
                              examples:
                                - JD
                            nif:
                              description: NIF/ VAT Number of the Client
                              type:
                                - string
                                - 'null'
                              examples:
                                - '1234566789'
                            postal_code:
                              description: Postal Code of the Client
                              type:
                                - string
                                - 'null'
                              examples:
                                - 1234-567
                            city:
                              description: City of the Client
                              type:
                                - string
                                - 'null'
                              examples:
                                - Lisbon
                            observations:
                              description: Additional information
                              type:
                                - string
                                - 'null'
                              examples:
                                - abc
                            address:
                              description: Address of the Client
                              type:
                                - string
                                - 'null'
                              examples:
                                - abc
                            country:
                              description: Country of the Client
                              type:
                                - string
                                - 'null'
                              examples:
                                - PT
                            created_at:
                              description: The datetime of the creation of the Client
                              type: string
                              format: date-time
                              examples:
                                - '2020-12-03T12:45:00'
                              readOnly: true
                            updated_at:
                              description: The datetime of the last update of the Client
                              type: string
                              format: date-time
                              examples:
                                - '2020-12-03T12:45:00'
                              readOnly: true
                            has_handshake:
                              description: Indicates if this Client is "connected" to work on Infraspeak Network.
                              type: boolean
                              examples:
                                - true
                            my_company:
                              description: Indicates whether it is the entity's default client
                              type: boolean
                              examples:
                                - true
                        relationships:
                          description: The relationships of the Client (Only present when expanded in the request)
                          type: object
                          properties:
                            buildings:
                              description: The Buildings associated to the Client
                              type: object
                            contacts:
                              description: The Contacts associated to the Client
                              type: object
                            files:
                              description: The Files associated to the Client
                              type: object
                            profilePicture:
                              description: The profile picture of the the Client
                              type: object
                            operators:
                              description: The Operators associated to the Client
                              type: object
                            handshake:
                              description: The Handshake associated to the Client
                              type: object
                      required:
                        - id
                        - type
                        - attributes
                  included:
                    description: List of relationships to be included
                    type: array
                    items:
                      anyOf:
                        - title: Entity
                          description: Entity model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Supplier
                              type: string
                              examples:
                                - '1'
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - entity
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                entity_id:
                                  type: integer
                                name:
                                  type: string
                                email:
                                  type: string
                                site:
                                  type: string
                                phone:
                                  type: string
                                cellphone:
                                  type: string
                                address:
                                  type: string
                                nib:
                                  type: string
                                nif:
                                  type: string
                                report_email:
                                  type: string
                                language:
                                  type: string
                                currency:
                                  type: string
                                license:
                                  type: string
                                  enum:
                                    - ASSISTANCE
                                    - CHURNED
                                    - COMPLEX
                                    - CSENTITY
                                    - DISTRIBUTED
                                    - HOTEL
                                    - NONE
                                    - PARTNER
                                    - PLACECHECKUP
                                profile_picture:
                                  type: string
                                entity_uuid:
                                  type: string
                                vat_rate:
                                  type: number
                                colour:
                                  type: string
                    uniqueItems: true
              examples:
                Example:
                  value:
                    data:
                      - type: client
                        id: '10959'
                        attributes:
                          client_id: 10959
                          name: Cliente Exemplo (08)
                          code: CE8
                          nif: '999999999'
                          address: Rua da Constituição
                          postal_code: 346-358
                          city: 'Porto '
                          country: PT
                          observations: Client observation
                    meta:
                      title: Meta
                      description: Meta model structure details
                      type: object
                      properties:
                        pagination:
                          type: object
                          properties:
                            total:
                              description: Total items.
                              type: integer
                              minimum: 0
                              examples:
                                - 1
                            count:
                              description: Total items returned for the current page.
                              type: integer
                              minimum: 0
                              examples:
                                - 1
                            per_page:
                              description: Maximum number of records per page.
                              type: integer
                              minimum: 1
                              default: 200
                              examples:
                                - 1
                            current_page:
                              description: Number of the current page.
                              type: integer
                              minimum: 1
                              default: 1
                            total_pages:
                              description: Number of the total pages.
                              type: integer
                              minimum: 1
                              default: 1
                          required:
                            - total
                            - count
                            - per_page
                            - current_page
                            - total_pages
                    links:
                      title: Response Links on listing operations
                      description: >-
                        Requests that return multiple items include a `links` attribute, with links related to request's
                        context.
                      type: object
                      properties:
                        self:
                          description: Current response link.
                          type: string
                          examples:
                            - /path?page=1
                          readOnly: true
                        first:
                          description: Link to the first page result.
                          type: string
                          examples:
                            - /path?page=1
                          readOnly: true
                        last:
                          description: Link to the previous page result.
                          type: string
                          examples:
                            - /path?page=1
                          readOnly: true
                        next:
                          description: Link to the next page result.
                          type: string
                          examples:
                            - /path?page=1
                          readOnly: true
                      required:
                        - self
                        - first
                        - last
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
    post:
      operationId: createClient
      tags:
        - Clients
      summary: Create a Client
      description: |
        This endpoint allows you to create a Client.

        A Client can be associated to one or more buildings.
      requestBody:
        content:
          application/json:
            schema:
              description: Clients payload
              type: object
              properties:
                name:
                  description: Client name
                  type: string
                  examples:
                    - John Doe
                code:
                  description: Client code
                  type:
                    - string
                    - 'null'
                  examples:
                    - CH0001
                nif:
                  description: NIF/ VAT number of the Client
                  type:
                    - string
                    - 'null'
                  examples:
                    - '123456789'
                address:
                  description: Address of the Client
                  type:
                    - string
                    - 'null'
                  examples:
                    - abc
                post_code:
                  description: Postal Code of the Client
                  type:
                    - string
                    - 'null'
                  examples:
                    - 1234-567
                city:
                  description: City of the Client
                  type:
                    - string
                    - 'null'
                  examples:
                    - Lisbon
                latitude:
                  description: Latitude of the Client
                  type:
                    - number
                    - 'null'
                  examples:
                    - -8.189341
                longitude:
                  description: Longitude of the Client
                  type:
                    - number
                    - 'null'
                  examples:
                    - 5.1893312
                observations:
                  description: Additional information
                  type:
                    - string
                    - 'null'
                  examples:
                    - abc
                country:
                  description: >-
                    Country of the Client. The value of this field must be compliant with the `ISO 3166-1 Alpha 2`
                    standard, for country codes.
                  type:
                    - string
                    - 'null'
                  examples:
                    - PT
                create_building:
                  description: Indicates if it should create a new building for the Client
                  type:
                    - boolean
                    - 'null'
                  examples:
                    - false
                local_id:
                  description: >-
                    Indicates the ID of the Building to replicate information from, when the 'create_building' field is
                    set to true (Optional).
                  type:
                    - integer
                    - 'null'
                  examples:
                    - 123
                contacts:
                  description: A list of Contact IDs to associate with this Client.
                  type: array
                  items:
                    description: The ID of the Contact
                    type: integer
                    examples:
                      - 123
                operators:
                  description: A list of Operator IDs to associate with this Client.
                  type: array
                  items:
                    description: The ID of the Operator
                    type: integer
                    examples:
                      - 123
              required:
                - name
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: Clients
                    description: Client model structure details
                    type: object
                    properties:
                      id:
                        description: ID of the Client
                        type: string
                        examples:
                          - '123'
                        readOnly: true
                      type:
                        description: Model type
                        type: string
                        enum:
                          - client
                        examples:
                          - client
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          client_id:
                            description: ID of the Client
                            type: integer
                            examples:
                              - 123
                          client_uuid:
                            description: UUID of the Client
                            type: string
                            format: uuid
                            examples:
                              - e632afe8-a1bf-4702-b5bd-b1163861ba51
                          name:
                            description: Client Name
                            type: string
                            examples:
                              - John Doe
                          code:
                            description: Client Code
                            type:
                              - string
                              - 'null'
                            examples:
                              - JD
                          nif:
                            description: NIF/ VAT Number of the Client
                            type:
                              - string
                              - 'null'
                            examples:
                              - '1234566789'
                          postal_code:
                            description: Postal Code of the Client
                            type:
                              - string
                              - 'null'
                            examples:
                              - 1234-567
                          city:
                            description: City of the Client
                            type:
                              - string
                              - 'null'
                            examples:
                              - Lisbon
                          observations:
                            description: Additional information
                            type:
                              - string
                              - 'null'
                            examples:
                              - abc
                          address:
                            description: Address of the Client
                            type:
                              - string
                              - 'null'
                            examples:
                              - abc
                          country:
                            description: Country of the Client
                            type:
                              - string
                              - 'null'
                            examples:
                              - PT
                          created_at:
                            description: The datetime of the creation of the Client
                            type: string
                            format: date-time
                            examples:
                              - '2020-12-03T12:45:00'
                            readOnly: true
                          updated_at:
                            description: The datetime of the last update of the Client
                            type: string
                            format: date-time
                            examples:
                              - '2020-12-03T12:45:00'
                            readOnly: true
                          has_handshake:
                            description: Indicates if this Client is "connected" to work on Infraspeak Network.
                            type: boolean
                            examples:
                              - true
                          my_company:
                            description: Indicates whether it is the entity's default client
                            type: boolean
                            examples:
                              - true
                      relationships:
                        description: The relationships of the Client (Only present when expanded in the request)
                        type: object
                        properties:
                          buildings:
                            description: The Buildings associated to the Client
                            type: object
                          contacts:
                            description: The Contacts associated to the Client
                            type: object
                          files:
                            description: The Files associated to the Client
                            type: object
                          profilePicture:
                            description: The profile picture of the the Client
                            type: object
                          operators:
                            description: The Operators associated to the Client
                            type: object
                          handshake:
                            description: The Handshake associated to the Client
                            type: object
                    required:
                      - id
                      - type
                      - attributes
              examples:
                Example:
                  value:
                    data:
                      type: client
                      id: '10959'
                      attributes:
                        client_id: 10959
                        name: Cliente Exemplo (08)
                        code: CE8
                        nif: '999999999'
                        address: Rua da Constituição
                        postal_code: 346-358
                        city: 'Porto '
                        country: PT
                        observations: Client observation
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
      x-toolbox: true
  /clients/{client}:
    get:
      operationId: getClient
      tags:
        - Clients
      summary: Get a Client
      description: This endpoint allows you to get a Client
      parameters:
        - name: client
          in: path
          description: ID of the Client
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: Clients
                    description: Client model structure details
                    type: object
                    properties:
                      id:
                        description: ID of the Client
                        type: string
                        examples:
                          - '123'
                        readOnly: true
                      type:
                        description: Model type
                        type: string
                        enum:
                          - client
                        examples:
                          - client
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          client_id:
                            description: ID of the Client
                            type: integer
                            examples:
                              - 123
                          client_uuid:
                            description: UUID of the Client
                            type: string
                            format: uuid
                            examples:
                              - e632afe8-a1bf-4702-b5bd-b1163861ba51
                          name:
                            description: Client Name
                            type: string
                            examples:
                              - John Doe
                          code:
                            description: Client Code
                            type:
                              - string
                              - 'null'
                            examples:
                              - JD
                          nif:
                            description: NIF/ VAT Number of the Client
                            type:
                              - string
                              - 'null'
                            examples:
                              - '1234566789'
                          postal_code:
                            description: Postal Code of the Client
                            type:
                              - string
                              - 'null'
                            examples:
                              - 1234-567
                          city:
                            description: City of the Client
                            type:
                              - string
                              - 'null'
                            examples:
                              - Lisbon
                          observations:
                            description: Additional information
                            type:
                              - string
                              - 'null'
                            examples:
                              - abc
                          address:
                            description: Address of the Client
                            type:
                              - string
                              - 'null'
                            examples:
                              - abc
                          country:
                            description: Country of the Client
                            type:
                              - string
                              - 'null'
                            examples:
                              - PT
                          created_at:
                            description: The datetime of the creation of the Client
                            type: string
                            format: date-time
                            examples:
                              - '2020-12-03T12:45:00'
                            readOnly: true
                          updated_at:
                            description: The datetime of the last update of the Client
                            type: string
                            format: date-time
                            examples:
                              - '2020-12-03T12:45:00'
                            readOnly: true
                          has_handshake:
                            description: Indicates if this Client is "connected" to work on Infraspeak Network.
                            type: boolean
                            examples:
                              - true
                          my_company:
                            description: Indicates whether it is the entity's default client
                            type: boolean
                            examples:
                              - true
                      relationships:
                        description: The relationships of the Client (Only present when expanded in the request)
                        type: object
                        properties:
                          buildings:
                            description: The Buildings associated to the Client
                            type: object
                          contacts:
                            description: The Contacts associated to the Client
                            type: object
                          files:
                            description: The Files associated to the Client
                            type: object
                          profilePicture:
                            description: The profile picture of the the Client
                            type: object
                          operators:
                            description: The Operators associated to the Client
                            type: object
                          handshake:
                            description: The Handshake associated to the Client
                            type: object
                    required:
                      - id
                      - type
                      - attributes
              examples:
                Example:
                  value:
                    data:
                      type: client
                      id: '10959'
                      attributes:
                        client_id: 10959
                        name: Cliente Exemplo (08)
                        code: CE8
                        nif: '999999999'
                        address: Rua da Constituição
                        postal_code: 346-358
                        city: 'Porto '
                        country: PT
                        observations: Client observation
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
    delete:
      operationId: deleteClient
      tags:
        - Clients
      summary: Delete a Client
      description: |
        This endpoint allows you to delete a Client.

        Note that a Client can only be deleted if it has no buldings associated.
      parameters:
        - name: client
          in: path
          description: ID of the Client
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items: {}
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
    patch:
      operationId: updateClient
      tags:
        - Clients
      summary: Update a Client
      description: This endpoint allows you to update a Client.
      parameters:
        - name: client
          in: path
          description: ID of the Client
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              description: Client Patch payload
              type: object
              properties:
                name:
                  description: Client Name
                  type: string
                  examples:
                    - John Doe
                code:
                  description: Client Code
                  type:
                    - string
                    - 'null'
                  examples:
                    - CH0001
                nif:
                  description: NIF/ VAT number of the Client
                  type:
                    - string
                    - 'null'
                  examples:
                    - '123456789'
                address:
                  description: Address of the Client
                  type:
                    - string
                    - 'null'
                  examples:
                    - abc
                post_code:
                  description: Postal Code of the Client
                  type:
                    - string
                    - 'null'
                  examples:
                    - 1234-567
                city:
                  description: City of the Client
                  type:
                    - string
                    - 'null'
                  examples:
                    - Lisbon
                latitude:
                  description: Latitude of the Client
                  type:
                    - number
                    - 'null'
                  examples:
                    - -8.189341
                longitude:
                  description: Longitude of the Client
                  type:
                    - number
                    - 'null'
                  examples:
                    - 5.1893312
                observations:
                  description: Additional information
                  type:
                    - string
                    - 'null'
                  examples:
                    - abc
                country:
                  description: >-
                    Country of the Client. The value of this field must be compliant with the `ISO 3166-1 Alpha 2`
                    standard, for country codes.
                  type:
                    - string
                    - 'null'
                  examples:
                    - PT
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: Clients
                    description: Client model structure details
                    type: object
                    properties:
                      id:
                        description: ID of the Client
                        type: string
                        examples:
                          - '123'
                        readOnly: true
                      type:
                        description: Model type
                        type: string
                        enum:
                          - client
                        examples:
                          - client
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          client_id:
                            description: ID of the Client
                            type: integer
                            examples:
                              - 123
                          client_uuid:
                            description: UUID of the Client
                            type: string
                            format: uuid
                            examples:
                              - e632afe8-a1bf-4702-b5bd-b1163861ba51
                          name:
                            description: Client Name
                            type: string
                            examples:
                              - John Doe
                          code:
                            description: Client Code
                            type:
                              - string
                              - 'null'
                            examples:
                              - JD
                          nif:
                            description: NIF/ VAT Number of the Client
                            type:
                              - string
                              - 'null'
                            examples:
                              - '1234566789'
                          postal_code:
                            description: Postal Code of the Client
                            type:
                              - string
                              - 'null'
                            examples:
                              - 1234-567
                          city:
                            description: City of the Client
                            type:
                              - string
                              - 'null'
                            examples:
                              - Lisbon
                          observations:
                            description: Additional information
                            type:
                              - string
                              - 'null'
                            examples:
                              - abc
                          address:
                            description: Address of the Client
                            type:
                              - string
                              - 'null'
                            examples:
                              - abc
                          country:
                            description: Country of the Client
                            type:
                              - string
                              - 'null'
                            examples:
                              - PT
                          created_at:
                            description: The datetime of the creation of the Client
                            type: string
                            format: date-time
                            examples:
                              - '2020-12-03T12:45:00'
                            readOnly: true
                          updated_at:
                            description: The datetime of the last update of the Client
                            type: string
                            format: date-time
                            examples:
                              - '2020-12-03T12:45:00'
                            readOnly: true
                          has_handshake:
                            description: Indicates if this Client is "connected" to work on Infraspeak Network.
                            type: boolean
                            examples:
                              - true
                          my_company:
                            description: Indicates whether it is the entity's default client
                            type: boolean
                            examples:
                              - true
                      relationships:
                        description: The relationships of the Client (Only present when expanded in the request)
                        type: object
                        properties:
                          buildings:
                            description: The Buildings associated to the Client
                            type: object
                          contacts:
                            description: The Contacts associated to the Client
                            type: object
                          files:
                            description: The Files associated to the Client
                            type: object
                          profilePicture:
                            description: The profile picture of the the Client
                            type: object
                          operators:
                            description: The Operators associated to the Client
                            type: object
                          handshake:
                            description: The Handshake associated to the Client
                            type: object
                    required:
                      - id
                      - type
                      - attributes
              examples:
                Example:
                  value:
                    data:
                      type: client
                      id: '10959'
                      attributes:
                        client_id: 10959
                        name: Cliente Exemplo (08)
                        code: CE8
                        nif: '999999999'
                        address: Rua da Constituição
                        postal_code: 346-358
                        city: 'Porto '
                        country: PT
                        observations: Client observation
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
      x-toolbox: true
  /clients/{client}/contacts:
    post:
      operationId: syncContacts
      tags:
        - Clients
      summary: Associate a list of contacts
      description: |
        This endpoint allows you to add a list of contacts for the client
      parameters:
        - name: client
          in: path
          description: ID of the Client
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                contact_ids:
                  type: array
                  items:
                    type: integer
              required:
                - contact_ids
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: Clients
                    description: Client model structure details
                    type: object
                    properties:
                      id:
                        description: ID of the Client
                        type: string
                        examples:
                          - '123'
                        readOnly: true
                      type:
                        description: Model type
                        type: string
                        enum:
                          - client
                        examples:
                          - client
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          client_id:
                            description: ID of the Client
                            type: integer
                            examples:
                              - 123
                          client_uuid:
                            description: UUID of the Client
                            type: string
                            format: uuid
                            examples:
                              - e632afe8-a1bf-4702-b5bd-b1163861ba51
                          name:
                            description: Client Name
                            type: string
                            examples:
                              - John Doe
                          code:
                            description: Client Code
                            type:
                              - string
                              - 'null'
                            examples:
                              - JD
                          nif:
                            description: NIF/ VAT Number of the Client
                            type:
                              - string
                              - 'null'
                            examples:
                              - '1234566789'
                          postal_code:
                            description: Postal Code of the Client
                            type:
                              - string
                              - 'null'
                            examples:
                              - 1234-567
                          city:
                            description: City of the Client
                            type:
                              - string
                              - 'null'
                            examples:
                              - Lisbon
                          observations:
                            description: Additional information
                            type:
                              - string
                              - 'null'
                            examples:
                              - abc
                          address:
                            description: Address of the Client
                            type:
                              - string
                              - 'null'
                            examples:
                              - abc
                          country:
                            description: Country of the Client
                            type:
                              - string
                              - 'null'
                            examples:
                              - PT
                          created_at:
                            description: The datetime of the creation of the Client
                            type: string
                            format: date-time
                            examples:
                              - '2020-12-03T12:45:00'
                            readOnly: true
                          updated_at:
                            description: The datetime of the last update of the Client
                            type: string
                            format: date-time
                            examples:
                              - '2020-12-03T12:45:00'
                            readOnly: true
                          has_handshake:
                            description: Indicates if this Client is "connected" to work on Infraspeak Network.
                            type: boolean
                            examples:
                              - true
                          my_company:
                            description: Indicates whether it is the entity's default client
                            type: boolean
                            examples:
                              - true
                      relationships:
                        description: The relationships of the Client (Only present when expanded in the request)
                        type: object
                        properties:
                          buildings:
                            description: The Buildings associated to the Client
                            type: object
                          contacts:
                            description: The Contacts associated to the Client
                            type: object
                          files:
                            description: The Files associated to the Client
                            type: object
                          profilePicture:
                            description: The profile picture of the the Client
                            type: object
                          operators:
                            description: The Operators associated to the Client
                            type: object
                          handshake:
                            description: The Handshake associated to the Client
                            type: object
                    required:
                      - id
                      - type
                      - attributes
              examples:
                Example:
                  value:
                    data:
                      type: client
                      id: '10959'
                      attributes:
                        client_id: 10959
                        name: Cliente Exemplo (08)
                        code: CE8
                        nif: '999999999'
                        address: Rua da Constituição
                        postal_code: 346-358
                        city: 'Porto '
                        country: PT
                        observations: Client observation
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /contacts:
    get:
      operationId: getContacts
      tags:
        - Contacts
      summary: List Contacts
      description: This endpoint allows you to list all Contacts.
      parameters:
        - name: limit
          in: query
          description: Number of contacts per page (defaults to 25).
          schema:
            type: integer
            minimum: 1
            default: 25
        - name: page
          in: query
          description: Page number for pagination (defaults to 1).
          schema:
            type: integer
            minimum: 1
            default: 1
        - name: expanded
          in: query
          description: |
            Comma-separated list of relations to include in the response.
            Allowed values: locals, profile_picture, suppliers, user, extensions_permissions.
          schema:
            type: string
        - name: sort
          in: query
          description: |
            Sort results by one or more fields. Allowed fields: name, email.
            Use a comma-separated list for multiple sorts and prefix a field with "-" for descending order.
            The alias "sorts" is also supported.
          schema:
            type: string
        - name: s_contact_id
          in: query
          description: Filter by a specific contact ID.
          schema:
            type: integer
        - name: s_contact_id_in
          in: query
          description: Comma-separated list of contact IDs to include.
          schema:
            type: string
        - name: s_contact_id_notin
          in: query
          description: Comma-separated list of contact IDs to exclude.
          schema:
            type: string
        - name: s_email
          in: query
          description: Filter by the exact email address.
          schema:
            type: string
            format: email
        - name: s_email_like
          in: query
          description: Filter contacts whose email contains the provided value (case-insensitive).
          schema:
            type: string
        - name: s_email_notin
          in: query
          description: Comma-separated list of email addresses to exclude.
          schema:
            type: string
        - name: s_name
          in: query
          description: Filter by the exact contact name.
          schema:
            type: string
        - name: s_name_like
          in: query
          description: Filter contacts whose name contains the provided value (case-insensitive).
          schema:
            type: string
        - name: s_phone
          in: query
          description: Filter by the contact phone number.
          schema:
            type: string
        - name: s_has_access
          in: query
          description: Filter by the has_access field (can be 1 or 0).
          schema:
            type: string
        - name: s_is_direct_user
          in: query
          description: Filters only contacts who have access to the Direct portal.
          schema:
            type: string
        - name: s_clients-client_id
          in: query
          description: Filter contacts associated with the provided client ID.
          schema:
            type: integer
        - name: sc_has_email
          in: query
          description: Scope results to contacts that have a non-empty email address (flag parameter, any value).
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      title: Contact
                      description: Contact model structure details
                      type: object
                      properties:
                        id:
                          description: ID of the Contact
                          type: string
                          readOnly: true
                          examples:
                            - '123'
                        type:
                          description: Model type
                          type: string
                          enum:
                            - contact
                          readOnly: true
                          examples:
                            - contact
                        attributes:
                          type: object
                          properties:
                            contact_id:
                              description: ID of the Contact
                              type: integer
                              readOnly: true
                              examples:
                                - 123
                            entity_id:
                              description: ID of the Entity
                              type: integer
                              readOnly: true
                              examples:
                                - 123
                            cellphone:
                              description: The cellphone number of the Contact
                              type: string
                              examples:
                                - '123456789'
                            language:
                              description: The language of the Contact
                              type: string
                              examples:
                                - pt_br
                            email:
                              description: The email of the Contact
                              type:
                                - string
                                - 'null'
                              examples:
                                - foo@bar.com
                            full_name:
                              description: The full name of the Contact
                              type: string
                              examples:
                                - Jose Pinhal
                            phone:
                              description: The phone number of the Contact
                              type: string
                              examples:
                                - '123456789'
                            is_direct_user:
                              description: Indicates whether the contact is a Direct user
                              type: boolean
                              examples:
                                - false
                            has_access:
                              description: Indicates whether the contact has access to Direct
                              oneOf:
                                - type: boolean
                                - type: integer
                                  enum:
                                    - 0
                                    - 1
                              examples:
                                - false
                        relationships:
                          description: The relationships of the Contact
                          type: object
                          properties:
                            suppliers:
                              description: The Suppliers associated to the Contact
                              type: object
                            clients:
                              description: The Clients associated to the Contact
                              type: object
                            extensionsPermissions:
                              description: The Extensions Permissions associated to the Contact
                              type: object
                            locals:
                              description: The Locations associated to the Contact
                              type: object
                            profilePicture:
                              description: The profile picture of the Contact
                              type: object
                            user:
                              description: The user associated to the Contact
                              type: object
                        meta:
                          type: object
                          properties:
                            custom_fields:
                              type:
                                - object
                                - 'null'
                              additionalProperties:
                                oneOf:
                                  - type: object
                                    properties:
                                      id:
                                        description: The unique identifier for the Custom Field
                                        type: integer
                                        examples:
                                          - 123
                                      field_type:
                                        description: The type of the Custom Field
                                        type: string
                                        enum:
                                          - SELECT
                                        examples:
                                          - SELECT
                                      value:
                                        description: The current values of the Custom Field in this resource
                                        type:
                                          - array
                                          - 'null'
                                        items:
                                          type: object
                                          properties:
                                            option_id:
                                              description: The ID of the selected option
                                              type: integer
                                              examples:
                                                - 123
                                            option_code:
                                              description: The code of the selected option
                                              type:
                                                - string
                                                - 'null'
                                              examples:
                                                - OP01
                                            value:
                                              description: The value of the selected option
                                              type: string
                                              examples:
                                                - My Option 1
                                      configs:
                                        type: object
                                        properties:
                                          label:
                                            description: The label for the Custom Field
                                            type: string
                                            examples:
                                              - My field X
                                          code:
                                            description: The unique code for the Custom Field
                                            type: string
                                            examples:
                                              - C01
                                          required:
                                            description: Specifies if the Custom Field is required
                                            type: boolean
                                            examples:
                                              - true
                                          are_values_readonly:
                                            description: >-
                                              Specifies if the Custom Field values are read only (so only integrations
                                              can set them).
                                            type: boolean
                                            examples:
                                              - false
                                          archived_at:
                                            description: >-
                                              Indicates when the custom field was archived for this object type. Objects
                                              that belong to the archived type will still display the custom field value
                                              if it was configured before the archiving.
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-03-12 12:12:12'
                                          type_settings:
                                            description: The type settings for the Custom Field
                                            type: object
                                            properties:
                                              allow_multiple_selection:
                                                description: Indicates if the Custom Field supports selecting multiple values
                                                type: boolean
                                                examples:
                                                  - true
                                              managed_by_integrations:
                                                description: Indicates if the Custom Field options are only managed by integrations
                                                type: boolean
                                                examples:
                                                  - true
                                  - type: object
                                    properties:
                                      id:
                                        description: The unique identifier for the Custom Field
                                        type: integer
                                        examples:
                                          - 123
                                      field_type:
                                        description: The type of the Custom Field
                                        type: string
                                        enum:
                                          - TEXT
                                        examples:
                                          - TEXT
                                      value:
                                        description: The current value of the Custom Field in this resource
                                        type:
                                          - string
                                          - 'null'
                                        examples:
                                          - abc
                                      configs:
                                        type: object
                                        properties:
                                          label:
                                            description: The label for the Custom Field
                                            type: string
                                            examples:
                                              - My field X
                                          code:
                                            description: The unique code for the Custom Field
                                            type: string
                                            examples:
                                              - C01
                                          required:
                                            description: Specifies if the Custom Field is required
                                            type: boolean
                                            examples:
                                              - true
                                          are_values_readonly:
                                            description: >-
                                              Specifies if the Custom Field values are read only (so only integrations
                                              can set them).
                                            type: boolean
                                            examples:
                                              - false
                                          archived_at:
                                            description: >-
                                              Indicates when the custom field was archived for this object type. Objects
                                              that belong to the archived type will still display the custom field value
                                              if it was configured before the archiving.
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-03-12 12:12:12'
                                          type_settings:
                                            description: >-
                                              The type settings for the Custom Field (Empty for Custom Fields of type
                                              TEXT)
                                            type: object
                                  - type: object
                                    properties:
                                      id:
                                        description: The unique identifier for the Custom Field
                                        type: integer
                                        examples:
                                          - 123
                                      field_type:
                                        description: The type of the Custom Field
                                        type: string
                                        enum:
                                          - BOOLEAN
                                        examples:
                                          - BOOLEAN
                                      value:
                                        description: The current value of the Custom Field in this resource
                                        type:
                                          - boolean
                                          - 'null'
                                        examples:
                                          - true
                                      configs:
                                        type: object
                                        properties:
                                          label:
                                            description: The label for the Custom Field
                                            type: string
                                            examples:
                                              - My field X
                                          code:
                                            description: The unique code for the Custom Field
                                            type: string
                                            examples:
                                              - C01
                                          required:
                                            description: Specifies if the Custom Field is required
                                            type: boolean
                                            examples:
                                              - true
                                          are_values_readonly:
                                            description: >-
                                              Specifies if the Custom Field values are read only (so only integrations
                                              can set them).
                                            type: boolean
                                            examples:
                                              - false
                                          archived_at:
                                            description: >-
                                              Indicates when the custom field was archived for this object type. Objects
                                              that belong to the archived type will still display the custom field value
                                              if it was configured before the archiving.
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-03-12 12:12:12'
                                          type_settings:
                                            description: >-
                                              The type settings for the Custom Field (There are none for the Custom
                                              Field Boolean type)
                                            type: object
                                  - type: object
                                    properties:
                                      id:
                                        description: The unique identifier for the Custom Field
                                        type: integer
                                        examples:
                                          - 123
                                      field_type:
                                        description: The type of the Custom Field
                                        type: string
                                        enum:
                                          - RELATIONSHIP
                                        examples:
                                          - RELATIONSHIP
                                      value:
                                        description: The current values of the Custom Field in this resource
                                        type:
                                          - array
                                          - 'null'
                                        items:
                                          type: object
                                          properties:
                                            related_to_type:
                                              description: The type of object that is selected as the Custom Field Values
                                              type: string
                                              enum:
                                                - CLIENT
                                                - CONTACT
                                              examples:
                                                - CLIENT
                                            related_to_id:
                                              description: The ID of object that is selected as the Custom Field Value
                                              type: integer
                                              examples:
                                                - 123
                                      configs:
                                        type: object
                                        properties:
                                          label:
                                            description: The label for the Custom Field
                                            type: string
                                            examples:
                                              - My field X
                                          code:
                                            description: The unique code for the Custom Field
                                            type: string
                                            examples:
                                              - C01
                                          required:
                                            description: Specifies if the Custom Field is required
                                            type: boolean
                                            examples:
                                              - true
                                          are_values_readonly:
                                            description: >-
                                              Specifies if the Custom Field values are read only (so only integrations
                                              can set them).
                                            type: boolean
                                            examples:
                                              - false
                                          archived_at:
                                            description: >-
                                              Indicates when the custom field was archived for this object type. Objects
                                              that belong to the archived type will still display the custom field value
                                              if it was configured before the archiving.
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-03-12 12:12:12'
                                          type_settings:
                                            description: The type settings for the Custom Field
                                            type: object
                                            properties:
                                              allow_multiple_selection:
                                                description: Indicates if the Custom Field allows multiple selection
                                                type: boolean
                                                examples:
                                                  - false
                                              relationship_object:
                                                description: The type of object that is selected as the Custom Field Values
                                                type: string
                                                enum:
                                                  - CLIENT
                                                  - CONTACT
                                                examples:
                                                  - CLIENT
                                  - type: object
                                    properties:
                                      id:
                                        description: The unique identifier for the Custom Field
                                        type: integer
                                        examples:
                                          - 123
                                      field_type:
                                        description: The type of the Custom Field
                                        type: string
                                        enum:
                                          - DATETIME
                                        examples:
                                          - DATETIME
                                      value:
                                        description: The current value of the Custom Field in this resource
                                        type:
                                          - string
                                          - 'null'
                                        format: date-time
                                        examples:
                                          - '2025-12-12 12:39:00'
                                      configs:
                                        type: object
                                        properties:
                                          label:
                                            description: The label for the Custom Field
                                            type: string
                                            examples:
                                              - My field X
                                          code:
                                            description: The unique code for the Custom Field
                                            type: string
                                            examples:
                                              - C01
                                          required:
                                            description: Specifies if the Custom Field is required
                                            type: boolean
                                            examples:
                                              - true
                                          are_values_readonly:
                                            description: >-
                                              Specifies if the Custom Field values are read only (so only integrations
                                              can set them).
                                            type: boolean
                                            examples:
                                              - false
                                          archived_at:
                                            description: >-
                                              Indicates when the custom field was archived for this object type. Objects
                                              that belong to the archived type will still display the custom field value
                                              if it was configured before the archiving.
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-03-12 12:12:12'
                                          type_settings:
                                            description: The type settings for the Custom Field
                                            type: object
                                            properties:
                                              allow_past_dates:
                                                description: Indicates if this Custom Field support past dates
                                                type: boolean
                                                examples:
                                                  - false
                                              allow_future_dates:
                                                description: Indicates if this Custom Field support future dates
                                                type: boolean
                                                examples:
                                                  - true
                                  - type: object
                                    properties:
                                      id:
                                        description: The unique identifier for the Custom Field
                                        type: integer
                                        examples:
                                          - 123
                                      field_type:
                                        description: The type of the Custom Field
                                        type: string
                                        enum:
                                          - NUMBER
                                        examples:
                                          - NUMBER
                                      value:
                                        description: The current value of the Custom Field in this resource
                                        type:
                                          - integer
                                          - 'null'
                                        examples:
                                          - 12
                                      configs:
                                        type: object
                                        properties:
                                          label:
                                            description: The label for the Custom Field
                                            type: string
                                            examples:
                                              - My field X
                                          code:
                                            description: The unique code for the Custom Field
                                            type: string
                                            examples:
                                              - C01
                                          required:
                                            description: Specifies if the Custom Field is required
                                            type: boolean
                                            examples:
                                              - true
                                          are_values_readonly:
                                            description: >-
                                              Specifies if the Custom Field values are read only (so only integrations
                                              can set them).
                                            type: boolean
                                            examples:
                                              - false
                                          archived_at:
                                            description: >-
                                              Indicates when the custom field was archived for this object type. Objects
                                              that belong to the archived type will still display the custom field value
                                              if it was configured before the archiving.
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-03-12 12:12:12'
                                          type_settings:
                                            description: The type settings for the Custom Field
                                            type: object
                                            properties:
                                              min:
                                                description: Indicates the minimum value for the Custom Field
                                                type:
                                                  - integer
                                                  - 'null'
                                                examples:
                                                  - 1
                                              max:
                                                description: Indicates the maximum value for the Custom Field
                                                type:
                                                  - integer
                                                  - 'null'
                                                examples:
                                                  - 3
                                discriminator:
                                  propertyName: field_type
                      required:
                        - id
                        - type
                        - attributes
                  meta:
                    title: Meta
                    description: Meta model structure details
                    type: object
                    properties:
                      pagination:
                        type: object
                        properties:
                          total:
                            description: Total items.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          count:
                            description: Total items returned for the current page.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          per_page:
                            description: Maximum number of records per page.
                            type: integer
                            minimum: 1
                            default: 200
                            examples:
                              - 1
                          current_page:
                            description: Number of the current page.
                            type: integer
                            minimum: 1
                            default: 1
                          total_pages:
                            description: Number of the total pages.
                            type: integer
                            minimum: 1
                            default: 1
                        required:
                          - total
                          - count
                          - per_page
                          - current_page
                          - total_pages
                  links:
                    title: Response Links on listing operations
                    description: >-
                      Requests that return multiple items include a `links` attribute, with links related to request's
                      context.
                    type: object
                    properties:
                      self:
                        description: Current response link.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      first:
                        description: Link to the first page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      last:
                        description: Link to the previous page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      next:
                        description: Link to the next page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                    required:
                      - self
                      - first
                      - last
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
    post:
      operationId: checkContact
      tags:
        - Contacts
      summary: Get or Create a Contact
      description: |
        (Deprecated - Use Get Contact (to check if it exists) and Post Contacts Create (to create it) instead)
        This endpoint allows you retrieve an existing contact or create it if does not exist.
        It will try to find the contact and return it, otherwise it will create the contact and then return it.
      requestBody:
        content:
          application/json:
            schema:
              description: Contact payload
              type: object
              properties:
                name:
                  description: The name of the Contact
                  type: string
                  examples:
                    - John Doe
                email:
                  description: The email of the Contact
                  type: string
                  examples:
                    - foo@bar.com
                phone:
                  description: The phone number of the Contact
                  type: string
                  examples:
                    - '123456789'
                cellphone:
                  description: The cellphone number of the Contact
                  type: string
                  examples:
                    - '123456789'
                language:
                  description: The language of the Contact
                  type: string
                  examples:
                    - pt_br
                has_access:
                  description: Indicate if the Contact has access to Direct
                  type: boolean
                  examples:
                    - true
                  readOnly: true
                direct_permissions:
                  description: Permissions for the contact in Direct (If has_access is set to true)
                  type: object
                  properties:
                    default_permissions:
                      description: Indicate if the contact has the default permissions on Direct
                      type: boolean
                      examples:
                        - true
                    preventive:
                      description: >-
                        Indicate if the contact has the permissions to view Preventive Maintenance (Planned Job Orders)
                        on Direct
                      type: boolean
                      examples:
                        - true
                    failure:
                      description: >-
                        Indicate if the contact has the permissions to view Corrective Maintenance (Work Orders) on
                        Direct
                      type: boolean
                      examples:
                        - true
                    failure_type:
                      description: >-
                        Indicate which type of Corrective Maintenance (Work Orders) the contact has access to (can be
                        all or only the work orders assigned to him)
                      type: string
                      enum:
                        - all
                        - assigned
                      examples:
                        - all
                    quotes:
                      description: Indicate if the contact has the permissions to view Quotes on Direct
                      type: boolean
                      examples:
                        - true
                    work_scheduled_reports:
                      description: >-
                        Indicate if the contact has the permissions to view reports for Preventive Maintenance (Planned
                        Job Orders) on Direct
                      type: boolean
                      examples:
                        - true
                    work_scheduled_reports_states:
                      description: >-
                        Indicate which state of Planned Job Orders can be included in the Planned Job Orders Reports for
                        this contact (can be all, only the completed ones, or only the confirmed ones)
                      type: string
                      enum:
                        - all
                        - completed
                        - confirmed
                      examples:
                        - all
                    failure_reports:
                      description: >-
                        Indicate if the contact has the permissions to view reports for Corrective Maintenance (Work
                        Orders) on Direct
                      type: boolean
                      examples:
                        - true
                    failure_reports_states:
                      description: >-
                        Indicate which state of Work Orders can be included in the Work Orders Reports for this contact
                        (can be all, only the completed ones, or only the confirmed ones)
                      type: string
                      enum:
                        - all
                        - completed
                        - confirmed
                      examples:
                        - all
                    show_user_info:
                      description: Indicate if the contact has the permissions to view the information of users
                      type: boolean
                      examples:
                        - true
                    show_failure_priority:
                      description: Indicate if the contact has the permissions to view the priority of Work Orders
                      type: boolean
                      examples:
                        - true
                    report_all_problem_areas:
                      description: Indicate if the contact has the permissions to report Work Orders in all problem areas
                      type: boolean
                      examples:
                        - true
                    reportable_problem_areas:
                      description: Indicate which problem areas this Contact can report Work Orders in
                      type: array
                      items:
                        description: The ID of the Problem Area
                        type: integer
                        examples:
                          - 123
                    allow_share_dashboards:
                      description: Indicate if the contact has the permissions to share dashboards
                      type: boolean
                      examples:
                        - true
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: Contact
                    description: Contact model structure details
                    type: object
                    properties:
                      id:
                        description: ID of the Contact
                        type: string
                        readOnly: true
                        examples:
                          - '123'
                      type:
                        description: Model type
                        type: string
                        enum:
                          - contact
                        readOnly: true
                        examples:
                          - contact
                      attributes:
                        type: object
                        properties:
                          contact_id:
                            description: ID of the Contact
                            type: integer
                            readOnly: true
                            examples:
                              - 123
                          entity_id:
                            description: ID of the Entity
                            type: integer
                            readOnly: true
                            examples:
                              - 123
                          cellphone:
                            description: The cellphone number of the Contact
                            type: string
                            examples:
                              - '123456789'
                          language:
                            description: The language of the Contact
                            type: string
                            examples:
                              - pt_br
                          email:
                            description: The email of the Contact
                            type:
                              - string
                              - 'null'
                            examples:
                              - foo@bar.com
                          full_name:
                            description: The full name of the Contact
                            type: string
                            examples:
                              - Jose Pinhal
                          phone:
                            description: The phone number of the Contact
                            type: string
                            examples:
                              - '123456789'
                          is_direct_user:
                            description: Indicates whether the contact is a Direct user
                            type: boolean
                            examples:
                              - false
                          has_access:
                            description: Indicates whether the contact has access to Direct
                            oneOf:
                              - type: boolean
                              - type: integer
                                enum:
                                  - 0
                                  - 1
                            examples:
                              - false
                      relationships:
                        description: The relationships of the Contact
                        type: object
                        properties:
                          suppliers:
                            description: The Suppliers associated to the Contact
                            type: object
                          clients:
                            description: The Clients associated to the Contact
                            type: object
                          extensionsPermissions:
                            description: The Extensions Permissions associated to the Contact
                            type: object
                          locals:
                            description: The Locations associated to the Contact
                            type: object
                          profilePicture:
                            description: The profile picture of the Contact
                            type: object
                          user:
                            description: The user associated to the Contact
                            type: object
                      meta:
                        type: object
                        properties:
                          custom_fields:
                            type:
                              - object
                              - 'null'
                            additionalProperties:
                              oneOf:
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - SELECT
                                      examples:
                                        - SELECT
                                    value:
                                      description: The current values of the Custom Field in this resource
                                      type:
                                        - array
                                        - 'null'
                                      items:
                                        type: object
                                        properties:
                                          option_id:
                                            description: The ID of the selected option
                                            type: integer
                                            examples:
                                              - 123
                                          option_code:
                                            description: The code of the selected option
                                            type:
                                              - string
                                              - 'null'
                                            examples:
                                              - OP01
                                          value:
                                            description: The value of the selected option
                                            type: string
                                            examples:
                                              - My Option 1
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: The type settings for the Custom Field
                                          type: object
                                          properties:
                                            allow_multiple_selection:
                                              description: Indicates if the Custom Field supports selecting multiple values
                                              type: boolean
                                              examples:
                                                - true
                                            managed_by_integrations:
                                              description: Indicates if the Custom Field options are only managed by integrations
                                              type: boolean
                                              examples:
                                                - true
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - TEXT
                                      examples:
                                        - TEXT
                                    value:
                                      description: The current value of the Custom Field in this resource
                                      type:
                                        - string
                                        - 'null'
                                      examples:
                                        - abc
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: >-
                                            The type settings for the Custom Field (Empty for Custom Fields of type
                                            TEXT)
                                          type: object
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - BOOLEAN
                                      examples:
                                        - BOOLEAN
                                    value:
                                      description: The current value of the Custom Field in this resource
                                      type:
                                        - boolean
                                        - 'null'
                                      examples:
                                        - true
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: >-
                                            The type settings for the Custom Field (There are none for the Custom Field
                                            Boolean type)
                                          type: object
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - RELATIONSHIP
                                      examples:
                                        - RELATIONSHIP
                                    value:
                                      description: The current values of the Custom Field in this resource
                                      type:
                                        - array
                                        - 'null'
                                      items:
                                        type: object
                                        properties:
                                          related_to_type:
                                            description: The type of object that is selected as the Custom Field Values
                                            type: string
                                            enum:
                                              - CLIENT
                                              - CONTACT
                                            examples:
                                              - CLIENT
                                          related_to_id:
                                            description: The ID of object that is selected as the Custom Field Value
                                            type: integer
                                            examples:
                                              - 123
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: The type settings for the Custom Field
                                          type: object
                                          properties:
                                            allow_multiple_selection:
                                              description: Indicates if the Custom Field allows multiple selection
                                              type: boolean
                                              examples:
                                                - false
                                            relationship_object:
                                              description: The type of object that is selected as the Custom Field Values
                                              type: string
                                              enum:
                                                - CLIENT
                                                - CONTACT
                                              examples:
                                                - CLIENT
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - DATETIME
                                      examples:
                                        - DATETIME
                                    value:
                                      description: The current value of the Custom Field in this resource
                                      type:
                                        - string
                                        - 'null'
                                      format: date-time
                                      examples:
                                        - '2025-12-12 12:39:00'
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: The type settings for the Custom Field
                                          type: object
                                          properties:
                                            allow_past_dates:
                                              description: Indicates if this Custom Field support past dates
                                              type: boolean
                                              examples:
                                                - false
                                            allow_future_dates:
                                              description: Indicates if this Custom Field support future dates
                                              type: boolean
                                              examples:
                                                - true
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - NUMBER
                                      examples:
                                        - NUMBER
                                    value:
                                      description: The current value of the Custom Field in this resource
                                      type:
                                        - integer
                                        - 'null'
                                      examples:
                                        - 12
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: The type settings for the Custom Field
                                          type: object
                                          properties:
                                            min:
                                              description: Indicates the minimum value for the Custom Field
                                              type:
                                                - integer
                                                - 'null'
                                              examples:
                                                - 1
                                            max:
                                              description: Indicates the maximum value for the Custom Field
                                              type:
                                                - integer
                                                - 'null'
                                              examples:
                                                - 3
                              discriminator:
                                propertyName: field_type
                    required:
                      - id
                      - type
                      - attributes
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
      deprecated: true
  /cost-centers:
    get:
      operationId: getCostCenters
      tags:
        - Cost Centers
      summary: List all Cost Centers
      description: |
        This endpoint returns a paginated list of Cost Centers in Infraspeak.
      parameters:
        - name: expanded
          in: query
          description: |
            This parameter allows to expand the resulting Cost Center(s) relationships in the response.
          schema:
            type: string
            enum:
              - file
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      title: Cost Center
                      description: >
                        Cost Center resource structure details.


                        Cost Centers in Infraspeak can be associated to Lines in Sales and Buy Orders, Failures (Work
                        Orders) or Scheduled Works (Planned Job Orders).
                      type: object
                      properties:
                        id:
                          description: Cost Center ID
                          type: string
                          readOnly: true
                        type:
                          description: Resource type
                          type: string
                          enum:
                            - cost_center
                          readOnly: true
                        attributes:
                          type: object
                          properties:
                            name:
                              description: Name for the Cost Center.
                              type: string
                              examples:
                                - AVAC Corretiva
                            code:
                              description: Code for the Cost Center
                              type: string
                              examples:
                                - C.AVAC
                            responsible_name:
                              description: Name for the person responsible for the Cost Center
                              type:
                                - string
                                - 'null'
                              examples:
                                - Luis
                            responsible_email:
                              description: Email for the person responsible for the Cost Center
                              type:
                                - string
                                - 'null'
                              examples:
                                - luis@example.com
                            responsible_phone:
                              description: Phone Number for the person responsible for the Cost Center
                              type:
                                - string
                                - 'null'
                              examples:
                                - '+351912345678'
                            responsible_cellphone:
                              description: Cellphone Number for the person responsible for the Cost Center
                              type:
                                - string
                                - 'null'
                              examples:
                                - '+351912345678'
                            observation:
                              description: User defined Observations for the Cost Center
                              type:
                                - string
                                - 'null'
                              examples:
                                - An observation regarding my cost center.
                  included:
                    description: |
                      Resources related to Cost Centers available when using the
                      `expanded` parameter
                    type: array
                    items:
                      anyOf:
                        - title: File
                          description: File model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the File
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - file
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                file_id:
                                  description: File Id
                                  type: integer
                                  readOnly: true
                                file_uuid:
                                  description: File UUID
                                  type: string
                                  readOnly: true
                                related_to:
                                  description: Object which the File is related to
                                  type: string
                                  enum:
                                    - BUILDING
                                    - CATEGORY
                                    - CLIENT
                                    - ELEMENT
                                    - ELEMENT_REGISTRY
                                    - FAILURE
                                    - METERING_REGISTRY
                                    - OPERATOR
                                    - ORDER
                                    - QUOTE
                                    - QUOTE_REQUEST
                                    - RECEIVED_QUOTE
                                    - RECEIVED_QUOTE_REQUEST
                                    - REQUEST
                                    - SELL_ORDER
                                    - SUPPLIER
                                    - SCHEDULE_WORK
                                    - WORK
                                    - SCHEDULED_WORK
                                    - PURCHASE
                                    - PURCHASE_MATERIAL_LINE
                                    - PURCHASE_SERVICE_LINE
                                    - SALE
                                related_to_id:
                                  description: Relations Id
                                  type: integer
                                related_type:
                                  description: Object which the File is related to
                                  type: string
                                  enum:
                                    - BUILDING
                                    - CATEGORY
                                    - CLIENT
                                    - ELEMENT
                                    - ELEMENT_REGISTRY
                                    - FAILURE
                                    - METERING_REGISTRY
                                    - OPERATOR
                                    - ORDER
                                    - QUOTE
                                    - QUOTE_REQUEST
                                    - RECEIVED_QUOTE
                                    - RECEIVED_QUOTE_REQUEST
                                    - REQUEST
                                    - SELL_ORDER
                                    - SUPPLIER
                                    - SCHEDULE_WORK
                                    - WORK
                                  readOnly: true
                                file_label_id:
                                  description: File Label Id
                                  type:
                                    - integer
                                    - 'null'
                                name:
                                  description: File name
                                  type: string
                                  examples:
                                    - my_example_file
                                thumb:
                                  description: URL to the thumbnail, in case the File is an image.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                file_url:
                                  description: URL to the File
                                  type: string
                                  format: uri
                                  readOnly: true
                                description:
                                  type:
                                    - string
                                    - 'null'
                                expire_date:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T17:12:00.000Z'
                                has_reminder:
                                  type: boolean
                                  readOnly: true
                                file_type:
                                  description: Internal type of the file
                                  type: string
                                  enum:
                                    - cad
                                    - compressed
                                    - file
                                    - image
                                    - office
                                    - other
                                    - pdf
                                    - signature
                                    - video
                                  readOnly: true
                                permission_to_technician:
                                  type: boolean
                                  default: true
                                permission_to_manager:
                                  type: boolean
                                  default: true
                                permission_to_direct:
                                  type: boolean
                                  default: false
                                extension:
                                  type: string
                                  enum:
                                    - 3gp
                                    - 3gpp
                                    - bin
                                    - bmp
                                    - cad
                                    - csv
                                    - doc
                                    - docx
                                    - gif
                                    - jpeg
                                    - jpg
                                    - kmz
                                    - mov
                                    - mp4
                                    - odf
                                    - odp
                                    - pdf
                                    - png
                                    - ppt
                                    - pptx
                                    - qt
                                    - rar
                                    - txt
                                    - xls
                                    - xlsx
                                    - zip
                                  readOnly: true
                                network_status:
                                  description: Show the network status of the file.
                                  type: string
                                  enum:
                                    - SHARED
                                    - RECEIVED
                                    - NOT_SHARED
                                shared_with_supplier:
                                  description: Show if the file is currently in a shared status with the supplier.
                                  type: boolean
                                shared_with_client:
                                  description: Show if the file is currently in a shared status with the client.
                                  type: boolean
                                file_size:
                                  type: integer
                                  readOnly: true
                                created_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                  readOnly: true
                          required:
                            - id
                            - type
                            - attributes
                    uniqueItems: true
                  meta:
                    title: Meta
                    description: Meta model structure details
                    type: object
                    properties:
                      pagination:
                        type: object
                        properties:
                          total:
                            description: Total items.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          count:
                            description: Total items returned for the current page.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          per_page:
                            description: Maximum number of records per page.
                            type: integer
                            minimum: 1
                            default: 200
                            examples:
                              - 1
                          current_page:
                            description: Number of the current page.
                            type: integer
                            minimum: 1
                            default: 1
                          total_pages:
                            description: Number of the total pages.
                            type: integer
                            minimum: 1
                            default: 1
                        required:
                          - total
                          - count
                          - per_page
                          - current_page
                          - total_pages
                  links:
                    title: Response Links on listing operations
                    description: >-
                      Requests that return multiple items include a `links` attribute, with links related to request's
                      context.
                    type: object
                    properties:
                      self:
                        description: Current response link.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      first:
                        description: Link to the first page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      last:
                        description: Link to the previous page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      next:
                        description: Link to the next page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                    required:
                      - self
                      - first
                      - last
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
    post:
      operationId: createCostCenter
      tags:
        - Cost Centers
      summary: Create a Cost Center
      description: |
        This endpoint creates a new Cost Center in Infraspeak.
      requestBody:
        content:
          application/json:
            schema:
              description: Cost Center payload
              type: object
              properties:
                name:
                  description: Name for the Cost Center.
                  type: string
                  examples:
                    - AVAC Corretiva
                code:
                  description: Code for the Cost Center
                  type: string
                  examples:
                    - C.AVAC
                responsible_name:
                  description: Name for the person responsible for the Cost Center
                  type:
                    - string
                    - 'null'
                  examples:
                    - Luis
                responsible_email:
                  description: Email for the person responsible for the Cost Center
                  type:
                    - string
                    - 'null'
                  examples:
                    - luis@example.com
                responsible_phone:
                  description: Phone Number for the person responsible for the Cost Center
                  type:
                    - string
                    - 'null'
                  examples:
                    - '+351912345678'
                responsible_cellphone:
                  description: Cellphone Number for the person responsible for the Cost Center
                  type:
                    - string
                    - 'null'
                  examples:
                    - '+351912345678'
                observation:
                  description: User defined Observations for the Cost Center
                  type:
                    - string
                    - 'null'
                  examples:
                    - An observation regarding my cost center.
                file:
                  description: |
                    Image File to be attached to the Cost Center.

                    Accepted extensions are:
                      - `jpeg`
                      - `bmp`
                      - `png`
                      - `jpg`
                      - `gif`

                    Maximum file size allowed:
                      - `200.000 KB`
                  type:
                    - string
                    - 'null'
                  format: byte
              required:
                - name
                - code
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: Cost Center
                    description: >
                      Cost Center resource structure details.


                      Cost Centers in Infraspeak can be associated to Lines in Sales and Buy Orders, Failures (Work
                      Orders) or Scheduled Works (Planned Job Orders).
                    type: object
                    properties:
                      id:
                        description: Cost Center ID
                        type: string
                        readOnly: true
                      type:
                        description: Resource type
                        type: string
                        enum:
                          - cost_center
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          name:
                            description: Name for the Cost Center.
                            type: string
                            examples:
                              - AVAC Corretiva
                          code:
                            description: Code for the Cost Center
                            type: string
                            examples:
                              - C.AVAC
                          responsible_name:
                            description: Name for the person responsible for the Cost Center
                            type:
                              - string
                              - 'null'
                            examples:
                              - Luis
                          responsible_email:
                            description: Email for the person responsible for the Cost Center
                            type:
                              - string
                              - 'null'
                            examples:
                              - luis@example.com
                          responsible_phone:
                            description: Phone Number for the person responsible for the Cost Center
                            type:
                              - string
                              - 'null'
                            examples:
                              - '+351912345678'
                          responsible_cellphone:
                            description: Cellphone Number for the person responsible for the Cost Center
                            type:
                              - string
                              - 'null'
                            examples:
                              - '+351912345678'
                          observation:
                            description: User defined Observations for the Cost Center
                            type:
                              - string
                              - 'null'
                            examples:
                              - An observation regarding my cost center.
                  included:
                    description: |
                      Resources related to Cost Centers available when using the
                      `expanded` parameter
                    type: array
                    items:
                      anyOf:
                        - title: File
                          description: File model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the File
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - file
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                file_id:
                                  description: File Id
                                  type: integer
                                  readOnly: true
                                file_uuid:
                                  description: File UUID
                                  type: string
                                  readOnly: true
                                related_to:
                                  description: Object which the File is related to
                                  type: string
                                  enum:
                                    - BUILDING
                                    - CATEGORY
                                    - CLIENT
                                    - ELEMENT
                                    - ELEMENT_REGISTRY
                                    - FAILURE
                                    - METERING_REGISTRY
                                    - OPERATOR
                                    - ORDER
                                    - QUOTE
                                    - QUOTE_REQUEST
                                    - RECEIVED_QUOTE
                                    - RECEIVED_QUOTE_REQUEST
                                    - REQUEST
                                    - SELL_ORDER
                                    - SUPPLIER
                                    - SCHEDULE_WORK
                                    - WORK
                                    - SCHEDULED_WORK
                                    - PURCHASE
                                    - PURCHASE_MATERIAL_LINE
                                    - PURCHASE_SERVICE_LINE
                                    - SALE
                                related_to_id:
                                  description: Relations Id
                                  type: integer
                                related_type:
                                  description: Object which the File is related to
                                  type: string
                                  enum:
                                    - BUILDING
                                    - CATEGORY
                                    - CLIENT
                                    - ELEMENT
                                    - ELEMENT_REGISTRY
                                    - FAILURE
                                    - METERING_REGISTRY
                                    - OPERATOR
                                    - ORDER
                                    - QUOTE
                                    - QUOTE_REQUEST
                                    - RECEIVED_QUOTE
                                    - RECEIVED_QUOTE_REQUEST
                                    - REQUEST
                                    - SELL_ORDER
                                    - SUPPLIER
                                    - SCHEDULE_WORK
                                    - WORK
                                  readOnly: true
                                file_label_id:
                                  description: File Label Id
                                  type:
                                    - integer
                                    - 'null'
                                name:
                                  description: File name
                                  type: string
                                  examples:
                                    - my_example_file
                                thumb:
                                  description: URL to the thumbnail, in case the File is an image.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                file_url:
                                  description: URL to the File
                                  type: string
                                  format: uri
                                  readOnly: true
                                description:
                                  type:
                                    - string
                                    - 'null'
                                expire_date:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T17:12:00.000Z'
                                has_reminder:
                                  type: boolean
                                  readOnly: true
                                file_type:
                                  description: Internal type of the file
                                  type: string
                                  enum:
                                    - cad
                                    - compressed
                                    - file
                                    - image
                                    - office
                                    - other
                                    - pdf
                                    - signature
                                    - video
                                  readOnly: true
                                permission_to_technician:
                                  type: boolean
                                  default: true
                                permission_to_manager:
                                  type: boolean
                                  default: true
                                permission_to_direct:
                                  type: boolean
                                  default: false
                                extension:
                                  type: string
                                  enum:
                                    - 3gp
                                    - 3gpp
                                    - bin
                                    - bmp
                                    - cad
                                    - csv
                                    - doc
                                    - docx
                                    - gif
                                    - jpeg
                                    - jpg
                                    - kmz
                                    - mov
                                    - mp4
                                    - odf
                                    - odp
                                    - pdf
                                    - png
                                    - ppt
                                    - pptx
                                    - qt
                                    - rar
                                    - txt
                                    - xls
                                    - xlsx
                                    - zip
                                  readOnly: true
                                network_status:
                                  description: Show the network status of the file.
                                  type: string
                                  enum:
                                    - SHARED
                                    - RECEIVED
                                    - NOT_SHARED
                                shared_with_supplier:
                                  description: Show if the file is currently in a shared status with the supplier.
                                  type: boolean
                                shared_with_client:
                                  description: Show if the file is currently in a shared status with the client.
                                  type: boolean
                                file_size:
                                  type: integer
                                  readOnly: true
                                created_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                  readOnly: true
                          required:
                            - id
                            - type
                            - attributes
                    uniqueItems: true
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
      x-toolbox: true
  /cost-centers/{costCenterId}:
    get:
      operationId: getCostCenter
      tags:
        - Cost Centers
      summary: Get a Cost Center
      description: |
        This endpoint returns details about an specific Cost Center in Infraspeak.
      parameters:
        - name: costCenterId
          in: path
          description: Cost Center ID
          required: true
          schema:
            type: string
        - name: expanded
          in: query
          description: |
            This parameter allows to expand the resulting Cost Center(s) relationships in the response.
          schema:
            type: string
            enum:
              - file
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: Cost Center
                    description: >
                      Cost Center resource structure details.


                      Cost Centers in Infraspeak can be associated to Lines in Sales and Buy Orders, Failures (Work
                      Orders) or Scheduled Works (Planned Job Orders).
                    type: object
                    properties:
                      id:
                        description: Cost Center ID
                        type: string
                        readOnly: true
                      type:
                        description: Resource type
                        type: string
                        enum:
                          - cost_center
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          name:
                            description: Name for the Cost Center.
                            type: string
                            examples:
                              - AVAC Corretiva
                          code:
                            description: Code for the Cost Center
                            type: string
                            examples:
                              - C.AVAC
                          responsible_name:
                            description: Name for the person responsible for the Cost Center
                            type:
                              - string
                              - 'null'
                            examples:
                              - Luis
                          responsible_email:
                            description: Email for the person responsible for the Cost Center
                            type:
                              - string
                              - 'null'
                            examples:
                              - luis@example.com
                          responsible_phone:
                            description: Phone Number for the person responsible for the Cost Center
                            type:
                              - string
                              - 'null'
                            examples:
                              - '+351912345678'
                          responsible_cellphone:
                            description: Cellphone Number for the person responsible for the Cost Center
                            type:
                              - string
                              - 'null'
                            examples:
                              - '+351912345678'
                          observation:
                            description: User defined Observations for the Cost Center
                            type:
                              - string
                              - 'null'
                            examples:
                              - An observation regarding my cost center.
                  included:
                    description: |
                      Resources related to Cost Centers available when using the
                      `expanded` parameter
                    type: array
                    items:
                      anyOf:
                        - title: File
                          description: File model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the File
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - file
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                file_id:
                                  description: File Id
                                  type: integer
                                  readOnly: true
                                file_uuid:
                                  description: File UUID
                                  type: string
                                  readOnly: true
                                related_to:
                                  description: Object which the File is related to
                                  type: string
                                  enum:
                                    - BUILDING
                                    - CATEGORY
                                    - CLIENT
                                    - ELEMENT
                                    - ELEMENT_REGISTRY
                                    - FAILURE
                                    - METERING_REGISTRY
                                    - OPERATOR
                                    - ORDER
                                    - QUOTE
                                    - QUOTE_REQUEST
                                    - RECEIVED_QUOTE
                                    - RECEIVED_QUOTE_REQUEST
                                    - REQUEST
                                    - SELL_ORDER
                                    - SUPPLIER
                                    - SCHEDULE_WORK
                                    - WORK
                                    - SCHEDULED_WORK
                                    - PURCHASE
                                    - PURCHASE_MATERIAL_LINE
                                    - PURCHASE_SERVICE_LINE
                                    - SALE
                                related_to_id:
                                  description: Relations Id
                                  type: integer
                                related_type:
                                  description: Object which the File is related to
                                  type: string
                                  enum:
                                    - BUILDING
                                    - CATEGORY
                                    - CLIENT
                                    - ELEMENT
                                    - ELEMENT_REGISTRY
                                    - FAILURE
                                    - METERING_REGISTRY
                                    - OPERATOR
                                    - ORDER
                                    - QUOTE
                                    - QUOTE_REQUEST
                                    - RECEIVED_QUOTE
                                    - RECEIVED_QUOTE_REQUEST
                                    - REQUEST
                                    - SELL_ORDER
                                    - SUPPLIER
                                    - SCHEDULE_WORK
                                    - WORK
                                  readOnly: true
                                file_label_id:
                                  description: File Label Id
                                  type:
                                    - integer
                                    - 'null'
                                name:
                                  description: File name
                                  type: string
                                  examples:
                                    - my_example_file
                                thumb:
                                  description: URL to the thumbnail, in case the File is an image.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                file_url:
                                  description: URL to the File
                                  type: string
                                  format: uri
                                  readOnly: true
                                description:
                                  type:
                                    - string
                                    - 'null'
                                expire_date:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T17:12:00.000Z'
                                has_reminder:
                                  type: boolean
                                  readOnly: true
                                file_type:
                                  description: Internal type of the file
                                  type: string
                                  enum:
                                    - cad
                                    - compressed
                                    - file
                                    - image
                                    - office
                                    - other
                                    - pdf
                                    - signature
                                    - video
                                  readOnly: true
                                permission_to_technician:
                                  type: boolean
                                  default: true
                                permission_to_manager:
                                  type: boolean
                                  default: true
                                permission_to_direct:
                                  type: boolean
                                  default: false
                                extension:
                                  type: string
                                  enum:
                                    - 3gp
                                    - 3gpp
                                    - bin
                                    - bmp
                                    - cad
                                    - csv
                                    - doc
                                    - docx
                                    - gif
                                    - jpeg
                                    - jpg
                                    - kmz
                                    - mov
                                    - mp4
                                    - odf
                                    - odp
                                    - pdf
                                    - png
                                    - ppt
                                    - pptx
                                    - qt
                                    - rar
                                    - txt
                                    - xls
                                    - xlsx
                                    - zip
                                  readOnly: true
                                network_status:
                                  description: Show the network status of the file.
                                  type: string
                                  enum:
                                    - SHARED
                                    - RECEIVED
                                    - NOT_SHARED
                                shared_with_supplier:
                                  description: Show if the file is currently in a shared status with the supplier.
                                  type: boolean
                                shared_with_client:
                                  description: Show if the file is currently in a shared status with the client.
                                  type: boolean
                                file_size:
                                  type: integer
                                  readOnly: true
                                created_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                  readOnly: true
                          required:
                            - id
                            - type
                            - attributes
                    uniqueItems: true
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
    delete:
      operationId: deleteCostCenter
      tags:
        - Cost Centers
      summary: Delete a Cost Center
      description: |
        This endpoint deletes an specific Cost Center identified by the {costCenterId} path parameter.
      parameters:
        - name: costCenterId
          in: path
          description: Cost Center ID
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items: {}
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
    patch:
      operationId: updateCostCenter
      tags:
        - Cost Centers
      summary: Update a Cost Center
      description: |
        This endpoint updates information of an specific Cost Center identified by the {costCenterId} path parameter.
      parameters:
        - name: costCenterId
          in: path
          description: Cost Center ID
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              description: Cost Center Patch payload
              type: object
              properties:
                name:
                  description: Name for the Cost Center.
                  type: string
                  examples:
                    - AVAC Corretiva
                code:
                  description: Code for the Cost Center
                  type: string
                  examples:
                    - C.AVAC
                responsible_name:
                  description: Name for the person responsible for the Cost Center
                  type:
                    - string
                    - 'null'
                  examples:
                    - Luis
                responsible_email:
                  description: Email for the person responsible for the Cost Center
                  type:
                    - string
                    - 'null'
                  examples:
                    - luis@example.com
                responsible_phone:
                  description: Phone Number for the person responsible for the Cost Center
                  type:
                    - string
                    - 'null'
                  examples:
                    - '+351912345678'
                responsible_cellphone:
                  description: Cellphone Number for the person responsible for the Cost Center
                  type:
                    - string
                    - 'null'
                  examples:
                    - '+351912345678'
                observation:
                  description: User defined Observations for the Cost Center
                  type:
                    - string
                    - 'null'
                  examples:
                    - An observation regarding my cost center.
                file:
                  description: |
                    Image File to be attached to the Cost Center.

                    Accepted extensions are:
                      - `jpeg`
                      - `bmp`
                      - `png`
                      - `jpg`
                      - `gif`

                    Maximum file size allowed:
                      - `200.000 KB`
                  type:
                    - string
                    - 'null'
                  format: byte
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: Cost Center
                    description: >
                      Cost Center resource structure details.


                      Cost Centers in Infraspeak can be associated to Lines in Sales and Buy Orders, Failures (Work
                      Orders) or Scheduled Works (Planned Job Orders).
                    type: object
                    properties:
                      id:
                        description: Cost Center ID
                        type: string
                        readOnly: true
                      type:
                        description: Resource type
                        type: string
                        enum:
                          - cost_center
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          name:
                            description: Name for the Cost Center.
                            type: string
                            examples:
                              - AVAC Corretiva
                          code:
                            description: Code for the Cost Center
                            type: string
                            examples:
                              - C.AVAC
                          responsible_name:
                            description: Name for the person responsible for the Cost Center
                            type:
                              - string
                              - 'null'
                            examples:
                              - Luis
                          responsible_email:
                            description: Email for the person responsible for the Cost Center
                            type:
                              - string
                              - 'null'
                            examples:
                              - luis@example.com
                          responsible_phone:
                            description: Phone Number for the person responsible for the Cost Center
                            type:
                              - string
                              - 'null'
                            examples:
                              - '+351912345678'
                          responsible_cellphone:
                            description: Cellphone Number for the person responsible for the Cost Center
                            type:
                              - string
                              - 'null'
                            examples:
                              - '+351912345678'
                          observation:
                            description: User defined Observations for the Cost Center
                            type:
                              - string
                              - 'null'
                            examples:
                              - An observation regarding my cost center.
                  included:
                    description: |
                      Resources related to Cost Centers available when using the
                      `expanded` parameter
                    type: array
                    items:
                      anyOf:
                        - title: File
                          description: File model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the File
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - file
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                file_id:
                                  description: File Id
                                  type: integer
                                  readOnly: true
                                file_uuid:
                                  description: File UUID
                                  type: string
                                  readOnly: true
                                related_to:
                                  description: Object which the File is related to
                                  type: string
                                  enum:
                                    - BUILDING
                                    - CATEGORY
                                    - CLIENT
                                    - ELEMENT
                                    - ELEMENT_REGISTRY
                                    - FAILURE
                                    - METERING_REGISTRY
                                    - OPERATOR
                                    - ORDER
                                    - QUOTE
                                    - QUOTE_REQUEST
                                    - RECEIVED_QUOTE
                                    - RECEIVED_QUOTE_REQUEST
                                    - REQUEST
                                    - SELL_ORDER
                                    - SUPPLIER
                                    - SCHEDULE_WORK
                                    - WORK
                                    - SCHEDULED_WORK
                                    - PURCHASE
                                    - PURCHASE_MATERIAL_LINE
                                    - PURCHASE_SERVICE_LINE
                                    - SALE
                                related_to_id:
                                  description: Relations Id
                                  type: integer
                                related_type:
                                  description: Object which the File is related to
                                  type: string
                                  enum:
                                    - BUILDING
                                    - CATEGORY
                                    - CLIENT
                                    - ELEMENT
                                    - ELEMENT_REGISTRY
                                    - FAILURE
                                    - METERING_REGISTRY
                                    - OPERATOR
                                    - ORDER
                                    - QUOTE
                                    - QUOTE_REQUEST
                                    - RECEIVED_QUOTE
                                    - RECEIVED_QUOTE_REQUEST
                                    - REQUEST
                                    - SELL_ORDER
                                    - SUPPLIER
                                    - SCHEDULE_WORK
                                    - WORK
                                  readOnly: true
                                file_label_id:
                                  description: File Label Id
                                  type:
                                    - integer
                                    - 'null'
                                name:
                                  description: File name
                                  type: string
                                  examples:
                                    - my_example_file
                                thumb:
                                  description: URL to the thumbnail, in case the File is an image.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                file_url:
                                  description: URL to the File
                                  type: string
                                  format: uri
                                  readOnly: true
                                description:
                                  type:
                                    - string
                                    - 'null'
                                expire_date:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T17:12:00.000Z'
                                has_reminder:
                                  type: boolean
                                  readOnly: true
                                file_type:
                                  description: Internal type of the file
                                  type: string
                                  enum:
                                    - cad
                                    - compressed
                                    - file
                                    - image
                                    - office
                                    - other
                                    - pdf
                                    - signature
                                    - video
                                  readOnly: true
                                permission_to_technician:
                                  type: boolean
                                  default: true
                                permission_to_manager:
                                  type: boolean
                                  default: true
                                permission_to_direct:
                                  type: boolean
                                  default: false
                                extension:
                                  type: string
                                  enum:
                                    - 3gp
                                    - 3gpp
                                    - bin
                                    - bmp
                                    - cad
                                    - csv
                                    - doc
                                    - docx
                                    - gif
                                    - jpeg
                                    - jpg
                                    - kmz
                                    - mov
                                    - mp4
                                    - odf
                                    - odp
                                    - pdf
                                    - png
                                    - ppt
                                    - pptx
                                    - qt
                                    - rar
                                    - txt
                                    - xls
                                    - xlsx
                                    - zip
                                  readOnly: true
                                network_status:
                                  description: Show the network status of the file.
                                  type: string
                                  enum:
                                    - SHARED
                                    - RECEIVED
                                    - NOT_SHARED
                                shared_with_supplier:
                                  description: Show if the file is currently in a shared status with the supplier.
                                  type: boolean
                                shared_with_client:
                                  description: Show if the file is currently in a shared status with the client.
                                  type: boolean
                                file_size:
                                  type: integer
                                  readOnly: true
                                created_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                  readOnly: true
                          required:
                            - id
                            - type
                            - attributes
                    uniqueItems: true
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /elements:
    get:
      operationId: getElements
      tags:
        - Elements
      summary: List Elements (Assets)
      description: >
        Retrieves a list of Elements, which represent the Assets managed in Infraspeak.


        Use the query parameters (detailed in the [JQL
        documentation](../../../../../../../docs/api/../.markdown/1.introduction/4-parameters.md)) to filter and refine
        the list of Assets based on specific criteria.
      parameters: []
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      title: Element
                      description: Represents an Element (Asset) structure details
                      type: object
                      properties:
                        id:
                          description: The unique string identifier of the Element record.
                          type: string
                          readOnly: true
                          examples:
                            - '123'
                        type:
                          description: The resource type. Always 'element' for Element records.
                          type: string
                          enum:
                            - element
                          readOnly: true
                          examples:
                            - element
                        attributes:
                          description: An object containing the Element's attributes.
                          type: object
                          properties:
                            cost_center_id:
                              description: The ID of the Cost Center associated with this Element, if available.
                              type:
                                - integer
                                - 'null'
                              examples:
                                - 758
                            type:
                              description: |
                                The specific type of the Element.
                                Allowing to identify if a Element is a equipment or local
                              type: string
                              enum:
                                - LOCAL
                                - EQUIPMENT
                              examples:
                                - EQUIPMENT
                            barcode:
                              description: The barcode value associated with the Element, if available.
                              type:
                                - string
                                - 'null'
                              examples:
                                - N123T
                            code:
                              description: The assigned code or identifier for the Element, often used for quick reference.
                              type:
                                - string
                                - 'null'
                              examples:
                                - 123A
                            created_at:
                              description: |
                                The timestamp when the Element record was created.
                                This field uses the ISO 8601 format.
                              type: string
                              format: date-time
                              readOnly: true
                              examples:
                                - '2019-06-22T17:26:27.000000Z'
                            date_deleted:
                              description: The timestamp when the Element was marked as deleted (soft delete). Null if not deleted.
                              type:
                                - string
                                - 'null'
                              format: date-time
                              readOnly: true
                              examples:
                                - null
                            element_id:
                              description: The unique numeric identifier for the Element record (matches the top-level 'id').
                              type: integer
                              readOnly: true
                              examples:
                                - 123
                            element_uuid:
                              description: The universally unique identifier (UUID) for the Element record.
                              type: string
                              format: uuid
                              readOnly: true
                              examples:
                                - f81d4fae-7dec-11d0-a765-00a0c91e6bf6
                            entity_id:
                              description: The ID of the parent Entity this Element belongs to.
                              type: integer
                              examples:
                                - 456
                            failures_count:
                              description: A counter indicating the number of open Failures (Work orders) for this element.
                              type: integer
                              readOnly: true
                              examples:
                                - 0
                            has_bar_code:
                              description: Flag indicating whether the Element has an associated barcode.
                              type: boolean
                              examples:
                                - false
                            has_nfc:
                              description: Flag indicating whether the Element is equipped with an NFC tag.
                              type: boolean
                              examples:
                                - true
                            has_pmp:
                              description: |
                                Flag indicating whether the element has PMP (Preventive Maintenance Plan)
                                * Only present when the query parameter `showHasPMP` is set to true
                              type: boolean
                              examples:
                                - false
                            is_direct_page_accessible:
                              description: Flag indicating whether the element is accessible from Direct pages.
                              type: boolean
                              examples:
                                - true
                            is_from_network:
                              description: >-
                                Flag indicating whether the element is part of the Network feature (if it has been
                                shared).
                              type: boolean
                              examples:
                                - false
                            last_modified:
                              description: |
                                The timestamp of the last recorded modification or action related to the Element.
                                This field uses the DATETIME format (YYYY-MM-DD HH:MM:SS).
                              type:
                                - string
                                - 'null'
                              readOnly: true
                              examples:
                                - '2024-07-25 12:57:33'
                            latitude:
                              description: The geographical latitude coordinate of the Element, if available.
                              type:
                                - number
                                - 'null'
                              format: float
                              examples:
                                - 41.1458
                            local_id:
                              description: The ID of the Local (Location) where this Element belongs.
                              type:
                                - integer
                                - 'null'
                              examples:
                                - 445
                            longitude:
                              description: The geographical longitude coordinate of the Element, if available.
                              type:
                                - number
                                - 'null'
                              format: float
                              examples:
                                - 42.1458
                            maintenance_policy_id:
                              description: The ID of the Maintenance Policy associated with this Element, if available.
                              type:
                                - integer
                                - 'null'
                              examples:
                                - 659
                            matched_element:
                              title: MatchedElement
                              description: |
                                The matched element associated with this element.
                              type:
                                - object
                                - 'null'
                              properties:
                                type:
                                  description: The type of the matched element
                                  type: string
                                  enum:
                                    - LOCAL
                                    - EQUIPMENT
                                  examples:
                                    - EQUIPMENT
                                code:
                                  description: Code of the matched element
                                  type: string
                                  examples:
                                    - ASSET.1.CODE
                                id:
                                  description: ID of the matched element
                                  type: integer
                                  examples:
                                    - 12
                                is_from_network:
                                  description: Flag that indicates if the matched element is from network or not
                                  type: boolean
                                  examples:
                                    - false
                            metering:
                              description: >
                                Element measurements in array format

                                * Only available for the single-item element endpoint

                                * Only present when the query parameter `showMeteringData` is set to true, and if there
                                are any measurements. Otherwise, the field will not be sent
                              type: array
                              items:
                                type: object
                                properties:
                                  type:
                                    description: The type of measurement
                                    type: string
                                    enum:
                                      - RANGE
                                      - TEXT
                                      - CUMULATIVE
                                      - CATALOG
                                      - AUDIT
                                    examples:
                                      - CATALOG
                                  category_metering_id:
                                    description: The ID of the Category Metering associated with this measurement.
                                    type: integer
                                    examples:
                                      - 1
                                  element_registry_id:
                                    description: The ID of the Element Registry associated with this measurement.
                                    type: integer
                                    examples:
                                      - 2
                                  max_value:
                                    description: The maximum value of this measurement
                                    type:
                                      - number
                                      - 'null'
                                    examples:
                                      - 15
                                  min_value:
                                    description: The minimum value of this measurement
                                    type:
                                      - number
                                      - 'null'
                                    examples:
                                      - 5
                                  name:
                                    description: Name of this measurement.
                                    type: string
                                    examples:
                                      - Lorem
                                  statistics:
                                    description: Current measurement statistics
                                    oneOf:
                                      - description: Standard statistic for most types of measurements
                                        type: object
                                        properties:
                                          max:
                                            description: The maximum value of this statistic
                                            type: string
                                            examples:
                                              - '235'
                                          min:
                                            description: The minimum value of this statistic
                                            type: string
                                            examples:
                                              - '2'
                                          avg:
                                            description: The average value of this statistic
                                            type: string
                                            examples:
                                              - '109.17'
                                          stddev_samp:
                                            description: >
                                              The sample standard deviation of the metering readings.

                                              Indicates the data point spread around the average.

                                              Lower values mean data is closer to the average; higher values indicate a
                                              wider spread.
                                            type: string
                                            examples:
                                              - '100.68'
                                      - description: Statistics for `CATALOG` measurements type
                                        type: object
                                        properties:
                                          last_value:
                                            description: The last value of this measurement was recorded
                                            type: string
                                            examples:
                                              - option1
                                          las_reading_time:
                                            description: The date of the last value of this measurement was recorded
                                            type: string
                                            examples:
                                              - '2021-11-24T15:25:25+00:00'
                                  unit:
                                    description: Name of the type of measurement unit.
                                    type:
                                      - string
                                      - 'null'
                                    examples:
                                      - UN
                                  values:
                                    type: array
                                    items: {}
                            nfc_code:
                              description: The element's NFC tag code, if available.
                              type:
                                - string
                                - 'null'
                              examples:
                                - A123B
                            observation:
                              description: Optional notes or observations recorded for the Element.
                              type:
                                - string
                                - 'null'
                              examples:
                                - Lorem ipsum dolor sit amet, consectetur adipiscing elit
                            updated_at:
                              description: |
                                The timestamp when the Element record was last updated.
                                This field uses the ISO 8601 format.
                              type: string
                              format: date-time
                              readOnly: true
                              examples:
                                - '2025-01-31T12:34:48.000000Z'
                          required:
                            - element_id
                            - type
                            - code
                            - entity_id
                            - observation
                            - has_nfc
                            - has_bar_code
                            - date_deleted
                            - failures_count
                            - nfc_code
                            - barcode
                            - last_modified
                            - local_id
                            - latitude
                            - longitude
                            - is_from_network
                            - element_uuid
                            - is_direct_page_accessible
                            - cost_center_id
                            - created_at
                            - updated_at
                        meta:
                          type: object
                          properties:
                            custom_fields:
                              type:
                                - object
                                - 'null'
                              additionalProperties:
                                oneOf:
                                  - type: object
                                    properties:
                                      id:
                                        description: The unique identifier for the Custom Field
                                        type: integer
                                        examples:
                                          - 123
                                      field_type:
                                        description: The type of the Custom Field
                                        type: string
                                        enum:
                                          - SELECT
                                        examples:
                                          - SELECT
                                      value:
                                        description: The current values of the Custom Field in this resource
                                        type:
                                          - array
                                          - 'null'
                                        items:
                                          type: object
                                          properties:
                                            option_id:
                                              description: The ID of the selected option
                                              type: integer
                                              examples:
                                                - 123
                                            option_code:
                                              description: The code of the selected option
                                              type:
                                                - string
                                                - 'null'
                                              examples:
                                                - OP01
                                            value:
                                              description: The value of the selected option
                                              type: string
                                              examples:
                                                - My Option 1
                                      configs:
                                        type: object
                                        properties:
                                          label:
                                            description: The label for the Custom Field
                                            type: string
                                            examples:
                                              - My field X
                                          code:
                                            description: The unique code for the Custom Field
                                            type: string
                                            examples:
                                              - C01
                                          required:
                                            description: Specifies if the Custom Field is required
                                            type: boolean
                                            examples:
                                              - true
                                          are_values_readonly:
                                            description: >-
                                              Specifies if the Custom Field values are read only (so only integrations
                                              can set them).
                                            type: boolean
                                            examples:
                                              - false
                                          archived_at:
                                            description: >-
                                              Indicates when the custom field was archived for this object type. Objects
                                              that belong to the archived type will still display the custom field value
                                              if it was configured before the archiving.
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-03-12 12:12:12'
                                          type_settings:
                                            description: The type settings for the Custom Field
                                            type: object
                                            properties:
                                              allow_multiple_selection:
                                                description: Indicates if the Custom Field supports selecting multiple values
                                                type: boolean
                                                examples:
                                                  - true
                                              managed_by_integrations:
                                                description: Indicates if the Custom Field options are only managed by integrations
                                                type: boolean
                                                examples:
                                                  - true
                                  - type: object
                                    properties:
                                      id:
                                        description: The unique identifier for the Custom Field
                                        type: integer
                                        examples:
                                          - 123
                                      field_type:
                                        description: The type of the Custom Field
                                        type: string
                                        enum:
                                          - TEXT
                                        examples:
                                          - TEXT
                                      value:
                                        description: The current value of the Custom Field in this resource
                                        type:
                                          - string
                                          - 'null'
                                        examples:
                                          - abc
                                      configs:
                                        type: object
                                        properties:
                                          label:
                                            description: The label for the Custom Field
                                            type: string
                                            examples:
                                              - My field X
                                          code:
                                            description: The unique code for the Custom Field
                                            type: string
                                            examples:
                                              - C01
                                          required:
                                            description: Specifies if the Custom Field is required
                                            type: boolean
                                            examples:
                                              - true
                                          are_values_readonly:
                                            description: >-
                                              Specifies if the Custom Field values are read only (so only integrations
                                              can set them).
                                            type: boolean
                                            examples:
                                              - false
                                          archived_at:
                                            description: >-
                                              Indicates when the custom field was archived for this object type. Objects
                                              that belong to the archived type will still display the custom field value
                                              if it was configured before the archiving.
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-03-12 12:12:12'
                                          type_settings:
                                            description: >-
                                              The type settings for the Custom Field (Empty for Custom Fields of type
                                              TEXT)
                                            type: object
                                  - type: object
                                    properties:
                                      id:
                                        description: The unique identifier for the Custom Field
                                        type: integer
                                        examples:
                                          - 123
                                      field_type:
                                        description: The type of the Custom Field
                                        type: string
                                        enum:
                                          - BOOLEAN
                                        examples:
                                          - BOOLEAN
                                      value:
                                        description: The current value of the Custom Field in this resource
                                        type:
                                          - boolean
                                          - 'null'
                                        examples:
                                          - true
                                      configs:
                                        type: object
                                        properties:
                                          label:
                                            description: The label for the Custom Field
                                            type: string
                                            examples:
                                              - My field X
                                          code:
                                            description: The unique code for the Custom Field
                                            type: string
                                            examples:
                                              - C01
                                          required:
                                            description: Specifies if the Custom Field is required
                                            type: boolean
                                            examples:
                                              - true
                                          are_values_readonly:
                                            description: >-
                                              Specifies if the Custom Field values are read only (so only integrations
                                              can set them).
                                            type: boolean
                                            examples:
                                              - false
                                          archived_at:
                                            description: >-
                                              Indicates when the custom field was archived for this object type. Objects
                                              that belong to the archived type will still display the custom field value
                                              if it was configured before the archiving.
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-03-12 12:12:12'
                                          type_settings:
                                            description: >-
                                              The type settings for the Custom Field (There are none for the Custom
                                              Field Boolean type)
                                            type: object
                                  - type: object
                                    properties:
                                      id:
                                        description: The unique identifier for the Custom Field
                                        type: integer
                                        examples:
                                          - 123
                                      field_type:
                                        description: The type of the Custom Field
                                        type: string
                                        enum:
                                          - RELATIONSHIP
                                        examples:
                                          - RELATIONSHIP
                                      value:
                                        description: The current values of the Custom Field in this resource
                                        type:
                                          - array
                                          - 'null'
                                        items:
                                          type: object
                                          properties:
                                            related_to_type:
                                              description: The type of object that is selected as the Custom Field Values
                                              type: string
                                              enum:
                                                - CLIENT
                                                - CONTACT
                                              examples:
                                                - CLIENT
                                            related_to_id:
                                              description: The ID of object that is selected as the Custom Field Value
                                              type: integer
                                              examples:
                                                - 123
                                      configs:
                                        type: object
                                        properties:
                                          label:
                                            description: The label for the Custom Field
                                            type: string
                                            examples:
                                              - My field X
                                          code:
                                            description: The unique code for the Custom Field
                                            type: string
                                            examples:
                                              - C01
                                          required:
                                            description: Specifies if the Custom Field is required
                                            type: boolean
                                            examples:
                                              - true
                                          are_values_readonly:
                                            description: >-
                                              Specifies if the Custom Field values are read only (so only integrations
                                              can set them).
                                            type: boolean
                                            examples:
                                              - false
                                          archived_at:
                                            description: >-
                                              Indicates when the custom field was archived for this object type. Objects
                                              that belong to the archived type will still display the custom field value
                                              if it was configured before the archiving.
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-03-12 12:12:12'
                                          type_settings:
                                            description: The type settings for the Custom Field
                                            type: object
                                            properties:
                                              allow_multiple_selection:
                                                description: Indicates if the Custom Field allows multiple selection
                                                type: boolean
                                                examples:
                                                  - false
                                              relationship_object:
                                                description: The type of object that is selected as the Custom Field Values
                                                type: string
                                                enum:
                                                  - CLIENT
                                                  - CONTACT
                                                examples:
                                                  - CLIENT
                                  - type: object
                                    properties:
                                      id:
                                        description: The unique identifier for the Custom Field
                                        type: integer
                                        examples:
                                          - 123
                                      field_type:
                                        description: The type of the Custom Field
                                        type: string
                                        enum:
                                          - DATETIME
                                        examples:
                                          - DATETIME
                                      value:
                                        description: The current value of the Custom Field in this resource
                                        type:
                                          - string
                                          - 'null'
                                        format: date-time
                                        examples:
                                          - '2025-12-12 12:39:00'
                                      configs:
                                        type: object
                                        properties:
                                          label:
                                            description: The label for the Custom Field
                                            type: string
                                            examples:
                                              - My field X
                                          code:
                                            description: The unique code for the Custom Field
                                            type: string
                                            examples:
                                              - C01
                                          required:
                                            description: Specifies if the Custom Field is required
                                            type: boolean
                                            examples:
                                              - true
                                          are_values_readonly:
                                            description: >-
                                              Specifies if the Custom Field values are read only (so only integrations
                                              can set them).
                                            type: boolean
                                            examples:
                                              - false
                                          archived_at:
                                            description: >-
                                              Indicates when the custom field was archived for this object type. Objects
                                              that belong to the archived type will still display the custom field value
                                              if it was configured before the archiving.
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-03-12 12:12:12'
                                          type_settings:
                                            description: The type settings for the Custom Field
                                            type: object
                                            properties:
                                              allow_past_dates:
                                                description: Indicates if this Custom Field support past dates
                                                type: boolean
                                                examples:
                                                  - false
                                              allow_future_dates:
                                                description: Indicates if this Custom Field support future dates
                                                type: boolean
                                                examples:
                                                  - true
                                  - type: object
                                    properties:
                                      id:
                                        description: The unique identifier for the Custom Field
                                        type: integer
                                        examples:
                                          - 123
                                      field_type:
                                        description: The type of the Custom Field
                                        type: string
                                        enum:
                                          - NUMBER
                                        examples:
                                          - NUMBER
                                      value:
                                        description: The current value of the Custom Field in this resource
                                        type:
                                          - integer
                                          - 'null'
                                        examples:
                                          - 12
                                      configs:
                                        type: object
                                        properties:
                                          label:
                                            description: The label for the Custom Field
                                            type: string
                                            examples:
                                              - My field X
                                          code:
                                            description: The unique code for the Custom Field
                                            type: string
                                            examples:
                                              - C01
                                          required:
                                            description: Specifies if the Custom Field is required
                                            type: boolean
                                            examples:
                                              - true
                                          are_values_readonly:
                                            description: >-
                                              Specifies if the Custom Field values are read only (so only integrations
                                              can set them).
                                            type: boolean
                                            examples:
                                              - false
                                          archived_at:
                                            description: >-
                                              Indicates when the custom field was archived for this object type. Objects
                                              that belong to the archived type will still display the custom field value
                                              if it was configured before the archiving.
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-03-12 12:12:12'
                                          type_settings:
                                            description: The type settings for the Custom Field
                                            type: object
                                            properties:
                                              min:
                                                description: Indicates the minimum value for the Custom Field
                                                type:
                                                  - integer
                                                  - 'null'
                                                examples:
                                                  - 1
                                              max:
                                                description: Indicates the maximum value for the Custom Field
                                                type:
                                                  - integer
                                                  - 'null'
                                                examples:
                                                  - 3
                                discriminator:
                                  propertyName: field_type
                      required:
                        - id
                        - type
                        - attributes
                  included:
                    description: >
                      List of related resources to be included in the response.

                      * The related resources will be present according to the parameters that have been sent via the
                      `expanded` query parameter
                    type: array
                    items:
                      anyOf:
                        - title: AndroidElementAuditStats
                          description: >
                            Audit Stats of an element

                            Details maximum potential, current recorded, and current achievable maximum values from
                            audit measurements.

                            * Schema used only for the Android application
                          type: object
                          properties:
                            id:
                              description: The unique string identifier of the Audit Stats record.
                              type:
                                - string
                                - 'null'
                              examples:
                                - '123'
                            type:
                              description: The resource type. Always 'audit_stats' for Audit Stats records.
                              type: string
                              enum:
                                - audit_stats
                              examples:
                                - audit_stats
                            attributes:
                              description: An object containing the Audit Stats attributes.
                              type: object
                              properties:
                                max_value:
                                  description: |
                                    The maximum potential value or weight defined for this measurement category
                                    associated with the asset. It represents the sum of the maximum weights
                                    of all related catalog entries for this category.
                                  type: number
                                  examples:
                                    - 100
                                current_value:
                                  description: |
                                    The current value or weight recorded for this measurement. If no value
                                    has been recorded, this will be 0.
                                  type: number
                                  examples:
                                    - 75
                                current_max_value:
                                  description: |
                                    The current maximum potential value achievable based on the recorded
                                    measurements. It sums the maximum weights for the catalog entries that
                                    currently have a recorded value.
                                  type: number
                                  examples:
                                    - 100
                              required:
                                - max_value
                                - current_value
                                - current_max_value
                          required:
                            - id
                            - type
                            - attributes
                        - title: ElementAuditStats
                          description: >
                            Audit Stats of an element

                            Details maximum potential, current recorded, and current achievable maximum values from
                            audit measurements.
                          type: object
                          properties:
                            id:
                              description: The unique string identifier of the Audit Stats record.
                              type:
                                - string
                                - 'null'
                              examples:
                                - '123'
                            type:
                              description: The resource type. Always 'audit_stats' for Audit Stats records.
                              type: string
                              enum:
                                - audit_stats
                              examples:
                                - audit_stats
                            attributes:
                              description: An object containing the Audit Stats attributes.
                              type: object
                              properties:
                                category_id:
                                  description: The ID of the Category associated with this Audit Stats.
                                  type: integer
                                  examples:
                                    - 1
                                max_value:
                                  description: |
                                    The maximum potential value or weight defined for this measurement category
                                    associated with the asset. It represents the sum of the maximum weights
                                    of all related catalog entries for this category.
                                  type: number
                                  examples:
                                    - 100
                                current_value:
                                  description: |
                                    The current value or weight recorded for this measurement. If no value
                                    has been recorded, this will be 0.
                                  type: number
                                  examples:
                                    - 75
                                current_max_value:
                                  description: |
                                    The current maximum potential value achievable based on the recorded
                                    measurements. It sums the maximum weights for the catalog entries that
                                    currently have a recorded value.
                                  type: number
                                  examples:
                                    - 100
                                schedule_work_id:
                                  description: The ID of the Schedule Work associated with this Audit Stats.
                                  type: integer
                                  examples:
                                    - 2
                              required:
                                - max_value
                                - current_value
                                - current_max_value
                                - category_id
                                - schedule_work_id
                          required:
                            - id
                            - type
                            - attributes
                        - title: ElementCharacteristic
                          description: Element Characteristic structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Element Characteristic
                              type: string
                              readOnly: true
                              examples:
                                - '123'
                            type:
                              description: The resource type. Always 'element-characteristic' for ElementCharacteristic records.
                              type: string
                              enum:
                                - element-characteristic
                              readOnly: true
                              examples:
                                - element-characteristic
                            attributes:
                              type: object
                              properties:
                                element_characteristic_id:
                                  description: ID of the Element Characteristic
                                  type: integer
                                  examples:
                                    - 123
                                element_id:
                                  description: ID of the associated Element
                                  type: integer
                                  examples:
                                    - 327
                                characteristic_id:
                                  description: ID of the associated Characteristic
                                  type: integer
                                  examples:
                                    - 587
                                value:
                                  description: >-
                                    Value of the Element Characteristic. The type of this value depends on the
                                    characteristic_type (can be text or number or null)
                                  oneOf:
                                    - type: string
                                      examples:
                                        - Good
                                    - type: number
                                      examples:
                                        - 147.85
                                    - type: 'null'
                                material_id:
                                  description: ID of the associated Material
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 687
                                quantity:
                                  description: Quantity of the material
                                  type:
                                    - number
                                    - 'null'
                                  examples:
                                    - 893
                                characteristic_catalog_id:
                                  description: ID of the associated Characteristic Catalog
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 687
                                is_from_network:
                                  description: Whether the Element Characteristic is received from the network
                                  type: boolean
                                  examples:
                                    - false
                              required:
                                - element_characteristic_id
                                - element_id
                                - characteristic_id
                                - value
                                - material_id
                                - quantity
                                - characteristic_catalog_id
                                - is_from_network
                          required:
                            - id
                            - type
                            - attributes
                        - title: ElementEconomic
                          description: Element Economic model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Element Economic
                              type: string
                              examples:
                                - '123'
                              readOnly: true
                            type:
                              description: The resource type. Always 'element_economic' for ElementEconomic records.
                              type: string
                              enum:
                                - element_economic
                              examples:
                                - element_economic
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                element_economic_id:
                                  description: ID of the Element Economic
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 123
                                  readOnly: true
                                acquisition_cost:
                                  description: Acquisition cost of the Element
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - '25.9'
                                lifetime:
                                  description: Lifetime of the Element
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 3
                                supplier_name:
                                  description: Name of the Element Supplier
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - John Doe
                                acquisition_date:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - type:
                                        - string
                                        - 'null'
                                      examples:
                                        - '2020-08-28 17:12:00'
                                      readOnly: true
                                stoppage_cost:
                                  description: Stoppage cost of the Element
                                  type:
                                    - number
                                    - 'null'
                                  examples:
                                    - 75.9
                                residual_value:
                                  description: Residual value of the Element
                                  type:
                                    - number
                                    - 'null'
                                  examples:
                                    - 2
                                actual_value:
                                  description: Actual value of the Element
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - '75.85'
                                annual_depreciation:
                                  description: Annual depreciation of the Element
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - '54.3687'
                                deperciation_tax:
                                  description: |
                                    Depreciation tax of the Element
                                    * Yes, we have a typo here
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - '50.00'
                                month_life:
                                  description: Month life of the Element
                                  type:
                                    - number
                                    - 'null'
                                  examples:
                                    - 1
                                monthly_depreciation:
                                  description: Monthly depreciation of the Element
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - '0.9542'
                                total_depreciated:
                                  description: Total depreciation of the Element
                                  type:
                                    - string
                                    - 'null'
                                detailed_costs_not_scheduled:
                                  description: Array of detailed not scheduled costs. (Can be an empty array)
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      label:
                                        description: Label of the cost
                                        type: string
                                        examples:
                                          - 5-2025
                                      group_start_time:
                                        type:
                                          - string
                                          - 'null'
                                        format: date-time
                                        examples:
                                          - '2025-05-01 00:00:00+00'
                                        readOnly: true
                                      labor_cost:
                                        description: The labor cost
                                        type: string
                                        examples:
                                          - '0.00'
                                      cumulative_labor_cost:
                                        description: The cumulative labor cost
                                        type: string
                                        examples:
                                          - '0.00'
                                      material_cost:
                                        description: The material cost
                                        type: string
                                        examples:
                                          - '0.00'
                                      cumulative_material_cost:
                                        description: The cumulative material cost
                                        type: string
                                        examples:
                                          - '0.00'
                                      cumulative_total_cost:
                                        description: The cumulative total cost
                                        type: string
                                        examples:
                                          - '0.00'
                                detailed_costs_scheduled:
                                  description: Array of detailed scheduled costs. (Can be an empty array)
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      label:
                                        description: Label of the cost
                                        type: string
                                        examples:
                                          - 5-2025
                                      group_start_time:
                                        type:
                                          - string
                                          - 'null'
                                        format: date-time
                                        examples:
                                          - '2025-05-01 00:00:00+00'
                                        readOnly: true
                                      labor_cost:
                                        description: The labor cost
                                        type: string
                                        examples:
                                          - '0.00'
                                      cumulative_labor_cost:
                                        description: The cumulative labor cost
                                        type: string
                                        examples:
                                          - '0.00'
                                      material_cost:
                                        description: The material cost
                                        type: string
                                        examples:
                                          - '0.00'
                                      cumulative_material_cost:
                                        description: The cumulative material cost
                                        type: string
                                        examples:
                                          - '0.00'
                                      cumulative_total_cost:
                                        description: The cumulative total cost
                                        type: string
                                        examples:
                                          - '0.00'
                                detailed_costs_failure:
                                  description: Array of detailed failure costs. (Can be an empty array)
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      label:
                                        description: Label of the cost
                                        type: string
                                        examples:
                                          - 5-2025
                                      group_start_time:
                                        type:
                                          - string
                                          - 'null'
                                        format: date-time
                                        examples:
                                          - '2025-05-01 00:00:00+00'
                                        readOnly: true
                                      labor_cost:
                                        description: The labor cost
                                        type: string
                                        examples:
                                          - '0.00'
                                      cumulative_labor_cost:
                                        description: The cumulative labor cost
                                        type: string
                                        examples:
                                          - '0.00'
                                      material_cost:
                                        description: The material cost
                                        type: string
                                        examples:
                                          - '0.00'
                                      cumulative_material_cost:
                                        description: The cumulative material cost
                                        type: string
                                        examples:
                                          - '0.00'
                                      cumulative_total_cost:
                                        description: The cumulative total cost
                                        type: string
                                        examples:
                                          - '0.00'
                              required:
                                - element_economic_id
                                - acquisition_cost
                                - lifetime
                                - supplier_name
                                - acquisition_date
                                - stoppage_cost
                                - residual_value
                                - actual_value
                                - annual_depreciation
                                - deperciation_tax
                                - month_life
                                - monthly_depreciation
                                - total_depreciated
                          required:
                            - id
                            - type
                            - attributes
                        - title: ElementNetworkSharedMapping
                          description: Represents the mapping of an Element (Asset) through the Network
                          type: object
                          properties:
                            id:
                              description: The unique string identifier of the Element Network Shared Mapping  record.
                              type:
                                - string
                                - 'null'
                              examples:
                                - '123'
                            type:
                              description: >-
                                The resource type. Always 'element_network_shared_mapping' for Element Network Shared
                                Mapping records.
                              type: string
                              enum:
                                - element_network_shared_mapping
                              examples:
                                - element_network_shared_mapping
                            attributes:
                              description: An object containing the Element Network Shared Mapping attributes.
                              type: object
                              properties:
                                element_id:
                                  description: The ID of the Element that was shared
                                  type: integer
                                  examples:
                                    - 22
                                  readOnly: true
                                entity_id:
                                  description: The ID of the Entity associated with the Element.
                                  type: integer
                                  examples:
                                    - 12
                                receiver_id:
                                  description: The ID of the receiver (Entity) to which the Element has been shared.
                                  type: integer
                                  examples:
                                    - 214
                                receiver_type:
                                  description: The type of receiver
                                  type: string
                                  enum:
                                    - CLIENT
                                    - SUPPLIER
                                  examples:
                                    - SUPPLIER
                                created_at:
                                  description: |
                                    The timestamp when the record was created.
                                    This field uses the ISO 8601 format.
                                  type: string
                                  format: date-time
                                  examples:
                                    - '2019-06-22T17:26:27.000000Z'
                                updated_at:
                                  description: |
                                    The timestamp when the record was last updated.
                                    This field uses the ISO 8601 format.
                                  type: string
                                  format: date-time
                                  examples:
                                    - '2025-01-31T12:34:48.000000Z'
                              required:
                                - element_id
                                - entity_id
                                - receiver_id
                                - receiver_type
                                - created_at
                                - updated_at
                          required:
                            - id
                            - type
                            - attributes
                        - title: ElementOtherCost
                          description: Element Other Cost model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Element Other Cost
                              type: string
                              examples:
                                - '123'
                              readOnly: true
                            type:
                              description: The resource type. Always 'element_other_cost' for Element Other Cost records.
                              type: string
                              enum:
                                - element_other_cost
                              examples:
                                - element_other_cost
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                element_other_cost_id:
                                  description: >-
                                    The unique numeric identifier for the Element Other Cost record (matches the
                                    top-level 'id').
                                  type: integer
                                  examples:
                                    - 123
                                  readOnly: true
                                element_id:
                                  description: ID of the associated Element
                                  type: integer
                                  examples:
                                    - 123
                                other_cost_id:
                                  description: ID of the associated Other Cost
                                  type: integer
                                  examples:
                                    - 123
                                entity_id:
                                  description: ID of the associated Entity
                                  type: integer
                                  examples:
                                    - 123
                                operator_id:
                                  description: ID of the associated Operator
                                  type: integer
                                  examples:
                                    - 123
                                numeric_value:
                                  description: Numeric value of the Element Other Cost
                                  type:
                                    - number
                                    - 'null'
                                  examples:
                                    - 1.2
                                start_time:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  examples:
                                    - '2020-08-28T17:12:00.000Z'
                                  readOnly: true
                                end_time:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  examples:
                                    - '2020-08-28T17:12:00.000Z'
                                  readOnly: true
                                description:
                                  description: A description about the Element Other Cost
                                  type:
                                    - string
                                    - 'null'
                                interval_value:
                                  description: The duration of the ElementOtherCost in the format (HH-MM-SS)
                                  type: string
                                  examples:
                                    - '00:15'
                                updated_date:
                                  type: string
                                  format: date-time
                                  examples:
                                    - '2020-08-28T17:12:00.000Z'
                                  readOnly: true
                                cost:
                                  description: The cost of the Element Other Cost
                                  type: number
                                  examples:
                                    - 1.2
                          required:
                            - id
                            - type
                            - attributes
                        - title: ElementRegistry
                          description: Represents an Element Registry (Asset Registry) structure details
                          type: object
                          properties:
                            id:
                              description: The unique string identifier of the Element Registry record.
                              type: string
                              readOnly: true
                              examples:
                                - '123'
                            type:
                              description: The resource type. Always 'element_registry' for Element Registry records.
                              type: string
                              enum:
                                - element_registry
                              readOnly: true
                              examples:
                                - element_registry
                            attributes:
                              description: An object containing the Element Registry's attributes.
                              type: object
                              properties:
                                element_registry_id:
                                  description: >-
                                    The unique numeric identifier for the Element Registry record (matches the top-level
                                    'id').
                                  type: integer
                                  examples:
                                    - 123
                                maintenance_procedure_id:
                                  description: >-
                                    The ID of the Maintenance Procedure associated with this Element Registry, if
                                    available.
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 345
                                operator_id:
                                  description: |
                                    The ID of the Operator associated with this Element Registry, if available.
                                    - Helps identify the operator who performed the action that generated the record
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 456
                                work_id:
                                  description: |
                                    The ID of the Work associated with this Element Registry, if available.
                                    - Works are also described in the application as `Planned Jobs`.
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 567
                                schedule_work_id:
                                  description: |
                                    The ID of the Scheduled Work associated with this Element Registry, if available.
                                    - Scheduled Works are also described in the application as `Planned jobs orders`.
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 678
                                status:
                                  description: Indicates the status of the Element Register
                                  type: string
                                  enum:
                                    - PENDING
                                    - CANCELED
                                    - ACTIVE
                                    - COMPLETED
                                  examples:
                                    - COMPLETED
                                element_id:
                                  description: The ID of the Element (Asset) associated with this Element Registry, if available.
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 987
                                start_time:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: |
                                        The timestamp for when the action was started
                                        - Not all actions have a **start_time**
                                        - An example of an action with **start_time** is `SCHEDULED_WORK`
                                      type:
                                        - string
                                        - 'null'
                                end_time:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: |
                                        The timestamp for when the action was finished
                                        - Not all actions have a **end_time**
                                        - An example of an action with **end_time** is `SCHEDULED_WORK`
                                      type:
                                        - string
                                        - 'null'
                                observation:
                                  description: Optional notes or observations recorded for the Element Registry.
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - Lorem ipsum dolor sit amet, consectetur adipiscing elit
                                entity_id:
                                  description: The ID of the parent Entity this Element belongs to.
                                  type: integer
                                  examples:
                                    - 456
                                action:
                                  description: >
                                    The performed action that generated the Element Registry

                                    - Actions can refer to the Element, or they can be about other resources linked to
                                    the Element in some way
                                  type: string
                                  enum:
                                    - ADD_COST
                                    - ADDED
                                    - ADDED_COST_CENTER
                                    - CHANGE_BAR_CODE
                                    - CHANGED_COST_CENTER
                                    - CHANGE_ELEMENT_STATUS
                                    - CHANGE_HOUSEKEEPER_OBSERVATION
                                    - CHANGE_HOUSEKEEPER_STATUS
                                    - CHANGE_IDENTIFIER
                                    - CHANGE_LOCAL
                                    - CHANGE_POLICY
                                    - CHANGE_WORK_ORDER_LOCAL
                                    - DELETE_COST
                                    - DELETED
                                    - DELETED_COST_CENTER
                                    - EDIT_COST
                                    - EDIT_ELEMENT_CHARACTERISTICS
                                    - FAILURE_TASK
                                    - MAINTENANCE_PROCEDURE
                                    - MANUAL_TASK
                                    - NEW_FAILURE
                                    - REMOVE_BAR_CODE
                                    - REMOVE_IDENTIFIER
                                    - SCHEDULED_WORK
                                    - SPECIAL_WORK
                                    - VISIT_BAR_CODE
                                    - VISIT_MANUAL
                                    - VISIT_NFC
                                  examples:
                                    - ADD_COST
                                failure_id:
                                  description: ID of the failure
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 789
                                intervention_id:
                                  description: ID of the intervention
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 875
                                duration:
                                  description: Duration of the action
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - 12 days 22:21:25
                                intervention_estimated_time:
                                  description: >-
                                    Estimate time, in format H:m:s, configured at Intervention level on the moment the
                                    Scheduled Work was completed
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - '01:21:25'
                                maintenance_procedure_estimated_time:
                                  description: >-
                                    Estimated time, in format H:m:s, configured at Task level on the moment the
                                    Scheduled Work was completed
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - '00:41:05'
                                from_local_id:
                                  description: ID of the Local where the action begins
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 756
                                to_local_id:
                                  description: ID of the Local where the action ends
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 755
                                to_maintenance_policy_id:
                                  description: ID of the Maintenance Policy where the action begins
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 742
                                from_maintenance_policy_id:
                                  description: ID of the Maintenance Policy where the action ends
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 364
                                quantity:
                                  description: Quantity used in the action
                                  type:
                                    - number
                                    - 'null'
                                  examples:
                                    - null
                                visit_type:
                                  description: Type of the visit
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - null
                                status_after:
                                  description: Status after the action
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - '1'
                                element_other_cost_id:
                                  description: ID of the element other cost
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 687
                                characteristics_updates:
                                  description: The characteristics updated during the action
                                  type:
                                    - array
                                    - 'null'
                                  items:
                                    type: object
                                    properties:
                                      label:
                                        description: The label of the Characteristic
                                        type: string
                                        examples:
                                          - A05. Weight
                                      newValue:
                                        description: The value after update. Has a mixed type
                                        type: string
                                        examples:
                                          - 2 Kg
                                      oldValue:
                                        description: The value before update. Has a mixed type
                                        type:
                                          - string
                                          - 'null'
                                        examples:
                                          - 6 Kg
                                      characteristicId:
                                        description: The ID of the Characteristic
                                        type: integer
                                        examples:
                                          - 1247
                                element_registry_uuid:
                                  description: The universally unique identifier (UUID) for the Element Registry record.
                                  type: string
                                  format: uuid
                                  readOnly: true
                                  examples:
                                    - f81d4fae-7dec-11d0-a765-00a0c91e6bf6
                                snapshot:
                                  description: >-
                                    A snapshot object containing all the valuable properties affected by the action in
                                    the Assets Registry.
                                  type:
                                    - object
                                    - 'null'
                                  examples:
                                    - {}
                                created_at:
                                  description: |
                                    The timestamp when the Element Registry record was created.
                                    This field uses the ISO 8601 format.
                                  type: string
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2019-06-22T17:26:27.000000Z'
                                updated_at:
                                  description: |
                                    The timestamp when the Element Registry record was last updated.
                                    This field uses the ISO 8601 format.
                                  type: string
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2025-01-31T12:34:48.000000Z'
                              required:
                                - element_registry_id
                                - maintenance_procedure_id
                                - operator_id
                                - work_id
                                - schedule_work_id
                                - status
                                - element_id
                                - start_time
                                - end_time
                                - observation
                                - entity_id
                                - action
                                - failure_id
                                - intervention_id
                                - duration
                                - from_local_id
                                - to_local_id
                                - to_maintenance_policy_id
                                - from_maintenance_policy_id
                                - quantity
                                - visit_type
                                - status_after
                                - element_other_cost_id
                                - characteristics_updates
                                - element_registry_uuid
                                - snapshot
                                - created_at
                                - updated_at
                          required:
                            - id
                            - type
                            - attributes
                        - title: FailureElementNetworkStatus
                          description: Represents the status of an Element (Asset) Failure through the Network
                          type: object
                          properties:
                            id:
                              description: The unique string identifier of the Failure Element Network Status   record.
                              type:
                                - string
                                - 'null'
                              examples:
                                - '123'
                            type:
                              description: >-
                                The resource type. Always 'failure_element_network_status' for Failure Element Network
                                Status records.
                              type: string
                              enum:
                                - failure_element_network_status
                              examples:
                                - failure_element_network_status
                            attributes:
                              description: An object containing the Failure Element Network Status  attributes.
                              type: object
                              properties:
                                element_id:
                                  description: The ID of the Element associated.
                                  type: integer
                                  examples:
                                    - 22
                                  readOnly: true
                                type:
                                  description: The type that identifies the side to which this mapping belongs
                                  type: string
                                  enum:
                                    - SENDER
                                    - RECEIVER
                                  examples:
                                    - SENDER
                                entity_id:
                                  description: The ID of the Entity associated with the Element.
                                  type: integer
                                  examples:
                                    - 12
                                failure_id:
                                  description: The ID of the Failure associated with the Element.
                                  type: integer
                                  examples:
                                    - 15
                                network_element_uuid:
                                  description: The UUID that identifies the Element throughout the Network
                                  type: string
                                  format: uuid
                                  examples:
                                    - e632afe8-a1bf-4702-b5bd-sb51a77dss3
                                network_failure_uuid:
                                  description: The UUID that identifies the Failure throughout the Network
                                  type: string
                                  format: uuid
                                  examples:
                                    - e632afe8-a1bf-4702-b5bd-b1163861ba51
                              required:
                                - entity_id
                                - failure_id
                                - element_id
                          required:
                            - id
                            - type
                            - attributes
                        - title: Category
                          description: Category model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Category
                              type: string
                              examples:
                                - '123'
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - category
                              examples:
                                - category
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                category_id:
                                  description: ID of the Category
                                  type: integer
                                  examples:
                                    - 123
                                  readOnly: true
                                type:
                                  description: >-
                                    The Category type. A "TYPE_OF_EQUIPMENT" Category is directly related to equipments
                                    (e.g. a fridge) and a Category "SOFT_MAINTENANCE" is related to Locations (E.g.
                                    hotel rooms).
                                  type: string
                                  enum:
                                    - SOFT_MAINTENANCE
                                    - TYPE_OF_EQUIPMENT
                                  examples:
                                    - SOFT_MAINTENANCE
                                all_technical_skills:
                                  description: Indicates if this category is associated to all technical skills.
                                  type:
                                    - boolean
                                    - 'null'
                                  examples:
                                    - true
                                code:
                                  description: Code of the Category.
                                  type: string
                                  examples:
                                    - VENT
                                entity_id:
                                  description: Entity ID of the Category.
                                  type: integer
                                  examples:
                                    - 123
                                full_code:
                                  description: Codes of the category's parents concatenated by dot with category code.
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - XYZ.VENT
                                  readOnly: true
                                has_children:
                                  description: Whether the category has subitems or not.
                                  type: boolean
                                  examples:
                                    - true
                                  readOnly: true
                                is_real:
                                  description: Whether the category is a folder (false) or "final" category (true).
                                  type:
                                    - boolean
                                    - 'null'
                                  examples:
                                    - true
                                name:
                                  description: Name of the Category.
                                  type: string
                                  examples:
                                    - Ventilation
                                parent_id:
                                  description: ID of the category parent.
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 123
                            relationships:
                              description: Available relationships of the Category.
                              type: object
                              properties:
                                categoryMeterings:
                                  description: Category Meterings associated to the category.
                                  type: object
                                characteristics:
                                  description: Characteristics associated to the category.
                                  type: object
                                entity:
                                  description: Entity associated to the category.
                                  type: object
                                files:
                                  description: Files associated to the category.
                                  type: object
                                maintenanceProcedures:
                                  description: Maintenance Procedures associated to the category.
                                  type: object
                                maintenancePolicies:
                                  description: Maintenance Policies associated to the category.
                                  type: object
                                problems:
                                  description: Problems associated to the category.
                                  type: object
                                technicalSkills:
                                  description: Technical Skills associated to the category.
                                  type: object
                          required:
                            - id
                            - type
                            - attributes
                        - title: MeteringRegistry
                          description: MeteringRegistry model structure details
                          type: object
                          properties:
                            id:
                              description: ID of MeteringRegistry
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - metering-registry
                            attributes:
                              type: object
                              properties:
                                metering_registry_id:
                                  description: ID of MeteringRegistry
                                  type: integer
                                element_id:
                                  description: ID of Element
                                  type: integer
                                operator_id:
                                  description: ID of Operator
                                  type: integer
                                category_metering_id:
                                  description: ID of Category Metering
                                  type: integer
                                category_metering_catalog_id:
                                  description: ID of Category Metering Catalog
                                  type: integer
                                value:
                                  description: Value of the Metering Registry
                                  type: string
                                weight:
                                  description: Value of the Metering Registry
                                  type:
                                    - integer
                                    - 'null'
                                observation:
                                  description: Observation of the Metering Registry
                                  type: string
                                updated_by:
                                  description: User that updated the Metering Registry
                                  type: string
                                date_created:
                                  description: Date of creation of Metering Registry
                                  type: string
                                automated:
                                  type: boolean
                                last_metering_date:
                                  description: Date of last metering
                                  type: string
                                last_metering_value:
                                  description: Value of last metering
                                  type: string
                                measured_at:
                                  description: Date of measurement
                                  type: string
                                uuid:
                                  description: Uuid of the Metering Registry
                                  type: string
                        - title: MaintenancePolicy
                          description: MaintenancePolicy model structure details
                          type: object
                          properties:
                            id:
                              description: ID of MaintenancePolicy
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - maintenance-policy
                            attributes:
                              type: object
                              properties:
                                maintenance_policy_id:
                                  description: ID of MaintenancePolicy
                                  type: integer
                                name:
                                  description: Maintenance Policy Name
                                  type: string
                                has_cost:
                                  description: Maintenance Policy has cost
                                  type: boolean
                                category_id:
                                  description: ID of Category
                                  type: integer
                        - title: Clients
                          description: Client model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Client
                              type: string
                              examples:
                                - '123'
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - client
                              examples:
                                - client
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                client_id:
                                  description: ID of the Client
                                  type: integer
                                  examples:
                                    - 123
                                client_uuid:
                                  description: UUID of the Client
                                  type: string
                                  format: uuid
                                  examples:
                                    - e632afe8-a1bf-4702-b5bd-b1163861ba51
                                name:
                                  description: Client Name
                                  type: string
                                  examples:
                                    - John Doe
                                code:
                                  description: Client Code
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - JD
                                nif:
                                  description: NIF/ VAT Number of the Client
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - '1234566789'
                                postal_code:
                                  description: Postal Code of the Client
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - 1234-567
                                city:
                                  description: City of the Client
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - Lisbon
                                observations:
                                  description: Additional information
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - abc
                                address:
                                  description: Address of the Client
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - abc
                                country:
                                  description: Country of the Client
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - PT
                                created_at:
                                  description: The datetime of the creation of the Client
                                  type: string
                                  format: date-time
                                  examples:
                                    - '2020-12-03T12:45:00'
                                  readOnly: true
                                updated_at:
                                  description: The datetime of the last update of the Client
                                  type: string
                                  format: date-time
                                  examples:
                                    - '2020-12-03T12:45:00'
                                  readOnly: true
                                has_handshake:
                                  description: Indicates if this Client is "connected" to work on Infraspeak Network.
                                  type: boolean
                                  examples:
                                    - true
                                my_company:
                                  description: Indicates whether it is the entity's default client
                                  type: boolean
                                  examples:
                                    - true
                            relationships:
                              description: The relationships of the Client (Only present when expanded in the request)
                              type: object
                              properties:
                                buildings:
                                  description: The Buildings associated to the Client
                                  type: object
                                contacts:
                                  description: The Contacts associated to the Client
                                  type: object
                                files:
                                  description: The Files associated to the Client
                                  type: object
                                profilePicture:
                                  description: The profile picture of the the Client
                                  type: object
                                operators:
                                  description: The Operators associated to the Client
                                  type: object
                                handshake:
                                  description: The Handshake associated to the Client
                                  type: object
                          required:
                            - id
                            - type
                            - attributes
                        - title: Cost Center
                          description: >
                            Cost Center resource structure details.


                            Cost Centers in Infraspeak can be associated to Lines in Sales and Buy Orders, Failures
                            (Work Orders) or Scheduled Works (Planned Job Orders).
                          type: object
                          properties:
                            id:
                              description: Cost Center ID
                              type: string
                              readOnly: true
                            type:
                              description: Resource type
                              type: string
                              enum:
                                - cost_center
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                name:
                                  description: Name for the Cost Center.
                                  type: string
                                  examples:
                                    - AVAC Corretiva
                                code:
                                  description: Code for the Cost Center
                                  type: string
                                  examples:
                                    - C.AVAC
                                responsible_name:
                                  description: Name for the person responsible for the Cost Center
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - Luis
                                responsible_email:
                                  description: Email for the person responsible for the Cost Center
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - luis@example.com
                                responsible_phone:
                                  description: Phone Number for the person responsible for the Cost Center
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - '+351912345678'
                                responsible_cellphone:
                                  description: Cellphone Number for the person responsible for the Cost Center
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - '+351912345678'
                                observation:
                                  description: User defined Observations for the Cost Center
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - An observation regarding my cost center.
                        - title: Failure
                          description: Failure model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Failure
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - failure
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                failure_id:
                                  description: ID of the Failure
                                  type: integer
                                  readOnly: true
                                  examples:
                                    - 1
                                uuid:
                                  description: Universally Unique Identifier for the Failure
                                  type: string
                                  format: uuid
                                  readOnly: true
                                problem_id:
                                  description: ID of the associated problem
                                  type: integer
                                status:
                                  type: string
                                  enum:
                                    - WAITING_APPROVAL
                                    - WAITING_RESOLUTION
                                    - IN_RESOLUTION
                                    - PAUSED
                                    - COMPLETED
                                    - ARCHIVED
                                  readOnly: true
                                start_date:
                                  type: string
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T08:48:00.000Z'
                                completed_date:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T17:12:00.000Z'
                                approved_date:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T09:30:00.000Z'
                                paused_date:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T13:05:00.000Z'
                                description:
                                  type: string
                                  examples:
                                    - Needs replacement
                                last_status_description:
                                  type: string
                                  examples:
                                    - Completed
                                observations:
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - Needs a new part
                                code:
                                  type: string
                                  examples:
                                    - WO2022
                                fts_vector:
                                  description: Denormalized data of a Failure
                                  type: string
                                priority:
                                  description: Failure priority number being 1 the lowest priority and 4 the highest priority.
                                  type: integer
                                  enum:
                                    - 1
                                    - 2
                                    - 3
                                    - 4
                                client_id:
                                  description: ID of the associated client defined according to the respective `local_id`.
                                  type: integer
                                  readOnly: true
                                entity_id:
                                  description: ID of the Entity of the Failure
                                  type: integer
                                  readOnly: true
                                metering_registry_id:
                                  description: ID of a possible associated metering registry
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                local_id:
                                  description: ID of the location associated to the Failure
                                  type: integer
                                paused_reason_id:
                                  description: ID of the paused reason associated to the Failure
                                  type: integer
                                external_id:
                                  description: External ID to be associated to the Failure
                                  type:
                                    - string
                                    - 'null'
                                report_name:
                                  description: Name of who reported the Failure
                                  type: string
                                solved:
                                  description: Indicates whether the Failure was closed successfully or not
                                  type: boolean
                                  readOnly: true
                                  default: false
                                confirmed:
                                  description: Indicates whether the Failure is confirmed or not
                                  type: boolean
                                  readOnly: true
                                  default: false
                                started:
                                  description: Indicates whether the Failure is started or not
                                  type: boolean
                                  readOnly: true
                                  default: false
                                paused:
                                  description: Indicates whether the Failure is paused or not
                                  type: boolean
                                  readOnly: true
                                  default: false
                                completed:
                                  description: Indicates whether the Failure is completed or not
                                  type: boolean
                                  readOnly: true
                                  default: false
                                archived:
                                  description: Indicates whether the Failure is archived or not
                                  type: boolean
                                  readOnly: true
                                  default: false
                                approved:
                                  description: Indicates whether the Failure is approved or not
                                  type: boolean
                                  readOnly: true
                                  default: false
                                next_schedule:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-29T10:30:00.000Z'
                                message_count:
                                  type: integer
                                  minimum: 0
                                  default: 0
                                  examples:
                                    - 3
                                time_statistics:
                                  type: object
                                  properties:
                                    approved_date:
                                      type:
                                        - string
                                        - 'null'
                                      format: date-time
                                      readOnly: true
                                      examples:
                                        - '2020-08-28T09:30:00.000Z'
                                    last_completed_date:
                                      type:
                                        - string
                                        - 'null'
                                      format: date-time
                                      readOnly: true
                                      examples:
                                        - '2020-08-28T17:12:00.000Z'
                                    last_paused_date:
                                      type:
                                        - string
                                        - 'null'
                                      format: date-time
                                      readOnly: true
                                      examples:
                                        - '2020-08-28T13:05:00.000Z'
                                    started_date:
                                      type:
                                        - string
                                        - 'null'
                                      format: date-time
                                      readOnly: true
                                      examples:
                                        - '2020-08-28T09:45:00.000Z'
                                    time_to_approve:
                                      description: Duration it took to approve the Failure since reported in `ISO8601` format.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - P0Y0M0DT0H42M0S
                                    time_to_complete:
                                      description: Duration it took to complete the Failure since reported in `ISO8601` format.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - P0Y0M0DT8H24M0S
                                    time_to_complete_after_started:
                                      description: >-
                                        Duration it took to complete the Failure since the resolution started in
                                        `ISO8601` format.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - P0Y0M0DT7H27M0S
                                    time_to_start:
                                      description: >-
                                        Duration it took to start the Failure's resolution since reported in `ISO8601`
                                        format.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - P0Y0M0DT0H57M0S
                                    time_to_start_after_approved:
                                      description: >-
                                        Duration it took to start the Failure's resolution since approved in `ISO8601`
                                        format.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - P0Y0M0DT0H15M0S
                                    real_duration:
                                      description: Real duration of the Failure's resolution time in `ISO8601` format.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - P0Y0M0DT7H27M0S
                                supplier_id:
                                  description: ID of the supplier associated to the Failure
                                  type: integer
                                signature_status:
                                  description: Indicates whether the Failure is signed or not
                                  type: string
                                  enum:
                                    - SIGNED
                                    - NOT_SIGNED
                                  default: NOT_SIGNED
                                last_status_change_date:
                                  type: string
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T09:30:00.000Z'
                                approved_by_id:
                                  description: ID of the operator who approved the Failure.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                completed_by_id:
                                  description: ID of the operator who completed the Failure.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                started_by_id:
                                  description: ID of the operator who started the Failure's resolution.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                paused_by_id:
                                  description: ID of the operator who paused the Failure's resolution.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                approved_by:
                                  description: Name of the operator who approved the Failure.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                completed_by:
                                  description: Name of the operator who completed the Failure.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                started_by:
                                  description: Name of the operator who started the Failure's resolution.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                paused_by:
                                  description: Name of the operator who paused the Failure's resolution.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                reported_by:
                                  description: Name of the operator who reported the Failure.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                manpower_duration:
                                  description: Duration of the Failure's manpower time in `ISO8601` format.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                  examples:
                                    - P0Y0M0DT7H27M0S
                                cost_center_id:
                                  description: ID of the cost center associated to the Failure
                                  type:
                                    - integer
                                    - 'null'
                                network_failure_id:
                                  description: ID of the Network Failure
                                  type: integer
                                  readOnly: true
                                  examples:
                                    - 1
                                created_at:
                                  type: string
                                  format: date-time
                                  readOnly: true
                                updated_at:
                                  type: string
                                  format: date-time
                                  readOnly: true
                                date_deleted:
                                  type: string
                                  format: date-time
                                  readOnly: true
                            relationships:
                              type: object
                              properties:
                                approvedBy:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                completedBy:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                createdBy:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                files:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - file
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                location:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - location
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                operator:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                          required:
                            - id
                            - type
                            - attributes
                        - title: Geolocations
                          description: Geolocation model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Geolocation
                              type: string
                              examples:
                                - '1'
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - geolocation
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                related_to_id:
                                  description: Id of Related Object
                                  type: integer
                                  examples:
                                    - 1
                                related_to_type:
                                  description: Type related to
                                  type: string
                                  enum:
                                    - ELEMENT
                                    - LOCAL
                                    - OPERATOR
                                  examples:
                                    - OPERATOR
                                latitude:
                                  description: latitude of the geolocation
                                  type: string
                                  examples:
                                    - '0.0000000'
                                longitude:
                                  description: longitude of the geolocation
                                  type: string
                                  examples:
                                    - '0.0000000'
                                accuracy:
                                  description: accuracy of the geolocation
                                  type: string
                                  examples:
                                    - '10'
                                altitude:
                                  description: altitude of the geolocation
                                  type: string
                                  examples:
                                    - '10'
                                provider:
                                  description: provider of the geolocation
                                  type: string
                                  examples:
                                    - MANUAL
                                states:
                                  description: states of the geolocation
                                  type: array
                                  items:
                                    type: string
                                  examples:
                                    - - WORKING
                                      - FAILURE
                                      - SCHEDULED_WORK
                                thumb:
                                  description: thumbnaill for the map
                                  type: string
                                  examples:
                                    - https://...
                                active:
                                  description: active state of the geolocation
                                  type: boolean
                                  examples:
                                    - true
                                created_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: Date when the Geolocation was created
                                      readOnly: true
                                updated_at:
                                  allOf:
                                    - allOf:
                                        - type:
                                            - string
                                            - 'null'
                                          pattern: >-
                                            ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                            ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                          examples:
                                            - '2021-07-21 18:38:00'
                                        - description: Date when the Geolocation was created
                                          readOnly: true
                                    - description: Date when the Geolocation was last updated
                                label:
                                  description: If related_to_type is 'OPERATOR' then we send his full name as the label
                                  type: string
                                  examples:
                                    - Gabriel Monteiro
                        - title: HousekeeperAssetStatus
                          description: HousekeeperAssetStatus model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the HousekeeperAssetStatus
                              type: string
                              examples:
                                - '1'
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - housekeeper_asset_status
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                status_id:
                                  description: Status Id
                                  type: integer
                                  examples:
                                    - 1
                                element_id:
                                  description: Element Id
                                  type: integer
                                  examples:
                                    - 2
                                observation:
                                  description: Observation
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - Some Observation
                                external_observation:
                                  description: External observation from a PMS Integration
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - Some Observation
                                work_id:
                                  description: ID of the related Work
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 2
                                max_target_status_date:
                                  description: Datetime of the max target status
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  examples:
                                    - '2021-07-20T18:38:00.000Z'
                                assignees:
                                  description: List of the assigned Operators
                                  type:
                                    - array
                                    - 'null'
                                  items:
                                    type: object
                                check_in:
                                  description: Check in
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  examples:
                                    - '2021-07-20T18:38:00.000Z'
                                check_out:
                                  description: Check out
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  examples:
                                    - '2021-07-21T18:38:00.000Z'
                        - title: HousekeeperStatus
                          description: HousekeeperStatus model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the HousekeeperStatus
                              type: string
                              examples:
                                - '1'
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - housekeeper_status
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                status_code:
                                  description: Status code
                                  type: string
                                  examples:
                                    - Status code
                                order:
                                  description: Status order
                                  type: integer
                                  examples:
                                    - 0
                                default:
                                  description: Status order
                                  type: boolean
                                  examples:
                                    - true
                        - title: Location
                          description: Location model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Location
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - location
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                entity_id:
                                  type: integer
                                name:
                                  description: Location name
                                  type: string
                                full_name:
                                  description: Names of the location's parents concatenated by hyphen with location name.
                                  type: string
                                  readOnly: true
                                code:
                                  description: Location code.
                                  type: string
                                full_code:
                                  description: Codes of the location's parents concatenated by dot with location code.
                                  type: string
                                  readOnly: true
                                original_full_code:
                                  description: Location original full code.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                observation:
                                  description: Additional information
                                  type:
                                    - string
                                    - 'null'
                                date_updated:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - '2020-12-03 12:45:00'
                                parent_id:
                                  description: ID of the location parent.
                                  type: integer
                                root_parent_id:
                                  description: ID of the location root parent (of `type` equals to `building`).
                                  type: integer
                                  readOnly: true
                                area:
                                  description: Location area
                                  type:
                                    - number
                                    - 'null'
                                glass_area:
                                  description: Location glass area
                                  type:
                                    - number
                                    - 'null'
                                volume:
                                  description: Location volume
                                  type:
                                    - number
                                    - 'null'
                                orientation:
                                  description: Solar orientation (North, South, West, East)
                                  type:
                                    - string
                                    - 'null'
                                is_from_network:
                                  description: If Location is from network
                                  type: boolean
                                  readOnly: true
                                local_uuid:
                                  description: Location UUID
                                  type: string
                                  format: uuid
                                  readOnly: true
                                assets_count:
                                  description: >-
                                    Cumulative count of assets (equipment) in this location and all its descendants.
                                    Only present when `with_assets_count=true` query parameter is provided.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                associations:
                                  description: >
                                    List of ways the operator is associated with this building. Possible values are
                                    `DIRECT` (via a direct local-operator assignment), `TEAM` (via a team the operator
                                    belongs to), and `CLIENT` (via a client the operator is assigned to).
                                  type: array
                                  items:
                                    type: string
                                    enum:
                                      - DIRECT
                                      - TEAM
                                      - CLIENT
                              required:
                                - name
                                - full_name
                                - code
                                - full_code
                                - observation
                                - date_updated
                            relationships:
                              type: object
                              properties:
                                building:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - building
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                files:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - file
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                operators:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - operator
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                localOrientation:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - localOrientation
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                          required:
                            - id
                            - type
                            - attributes
                        - title: ProfilePicture
                          description: Represents the standard schema for the resource profile image
                          type: object
                          properties:
                            id:
                              description: The unique string identifier of the Profile Picture record.
                              type:
                                - string
                                - 'null'
                              examples:
                                - '123'
                            type:
                              description: The resource type. Always 'profile-picture' for Profile Picture records.
                              type: string
                              enum:
                                - profile-picture
                              examples:
                                - profile-picture
                            attributes:
                              description: An object containing the Profile Picture attributes.
                              type: object
                              properties:
                                profile_picture_id:
                                  description: The ID of the Profile Picture
                                  type: integer
                                  examples:
                                    - 22
                                  readOnly: true
                                path:
                                  description: The full path of the original image
                                  type: string
                                  format: uri
                                  examples:
                                    - https://api.infraspeak.com/tmp/bebc3cd8efca9c6af8618d1016c163d3.jpeg
                                path_icon:
                                  description: The full path of the image as a icon
                                  type: string
                                  format: uri
                                  examples:
                                    - https://api.infraspeak.com/tmp/b80bd97ee33af2da479e40e4b64a811.jpeg
                                date_uploaded:
                                  description: |
                                    The timestamp when the picture was uploaded
                                    This field uses the ISO 8601 format.
                                  type: string
                                  format: date-time
                                  examples:
                                    - '2025-01-31T12:34:48.000000Z'
                              required:
                                - profile_picture_id
                                - path
                                - path_icon
                                - date_uploaded
                          required:
                            - id
                            - type
                            - attributes
                        - title: Stock
                          description: Stock model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Stock
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - stock
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                stock_id:
                                  description: ID of the Stock
                                  type: integer
                                  examples:
                                    - 1
                                  readOnly: true
                                stock_movement_id:
                                  description: ID of the last Stock Movement of the Stock
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 1
                                  readOnly: true
                                action:
                                  description: Action performed for the stock
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                warehouse_id:
                                  description: ID of the warehouse associated with the stock
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                material_id:
                                  description: ID of the material associated with the stock
                                  type: integer
                                  readOnly: true
                                quantity:
                                  description: Quantity of the material present in the stock
                                  type: number
                                  readOnly: true
                                mean_price:
                                  description: Mean price of the material associated with the stock
                                  type:
                                    - number
                                    - 'null'
                                  readOnly: true
                                observation:
                                  description: Description or notes of the stock
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                date:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  examples:
                                    - '2020-08-28 17:12:00'
                                  readOnly: true
                                failure_id:
                                  description: ID of the failure associated with the stock
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                schedule_work_id:
                                  description: ID of the schedule work associated with this stock
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                mean_price_manually_updated:
                                  description: Mean price of the stock (if it was manually updated)
                                  type: boolean
                                  default: false
                                  readOnly: true
                                date_updated:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  examples:
                                    - '2020-08-28 17:12:00'
                                  readOnly: true
                                destination_id:
                                  description: >-
                                    ID of the destination warehouse of the stock. Only present if the stock action is
                                    "MOVED_FROM"
                                  type: integer
                                  readOnly: true
                                source_id:
                                  description: >-
                                    ID of the origin warehouse of the stock. Only present if the stock action is
                                    "MOVED_TO"
                                  type: integer
                                  readOnly: true
                          required:
                            - id
                            - type
                            - attributes
                        - title: Material
                          description: Material model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Material
                              type: string
                              examples:
                                - '1'
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - material
                              examples:
                                - material
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                material_id:
                                  description: ID of the material
                                  type: integer
                                  examples:
                                    - 1
                                  readOnly: true
                                parent_id:
                                  description: ID of the associated folder of the material
                                  type: integer
                                  examples:
                                    - 1
                                  readOnly: true
                                name:
                                  description: Name of the material
                                  type: string
                                  examples:
                                    - Chair
                                code:
                                  description: Code of the material
                                  type: string
                                  examples:
                                    - CH-00001
                                full_code:
                                  description: Full code of the material (folders prefix included)
                                  type: string
                                  examples:
                                    - FOLDER.CH-00001
                                  readOnly: true
                                observations:
                                  description: Material observations
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - This is a observation
                                is_real:
                                  description: Indicates if this is a real material or a parent folder of materials
                                  type: boolean
                                  examples:
                                    - true
                                units:
                                  description: Indicates which kind of unit should this material be measured with
                                  type: string
                                  examples:
                                    - un
                                mean_price:
                                  description: Mean price of the material
                                  examples:
                                    - 8
                                has_children:
                                  description: Indicates if this material is a parent of other materials
                                  type: boolean
                                  examples:
                                    - true
                                default_sell_price:
                                  description: The default sell price of the material
                                  type: number
                                  examples:
                                    - 10
                                default_sell_vat:
                                  description: The default sell VAT of the material
                                  type: number
                                  examples:
                                    - 23
                                is_from_network:
                                  description: Indicates if the material was shared via Infraspeak Network
                                  type: boolean
                                  examples:
                                    - false
                                purchase_consumption_type:
                                  description: Purchase consumption type of the material
                                  type: string
                                  enum:
                                    - INHERIT
                                    - AUTOMATIC
                                    - MANUAL
                                  examples:
                                    - INHERIT
                          required:
                            - id
                            - type
                            - attributes
                    uniqueItems: true
                  meta:
                    title: Meta
                    description: Meta model structure details
                    type: object
                    properties:
                      pagination:
                        type: object
                        properties:
                          total:
                            description: Total items.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          count:
                            description: Total items returned for the current page.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          per_page:
                            description: Maximum number of records per page.
                            type: integer
                            minimum: 1
                            default: 200
                            examples:
                              - 1
                          current_page:
                            description: Number of the current page.
                            type: integer
                            minimum: 1
                            default: 1
                          total_pages:
                            description: Number of the total pages.
                            type: integer
                            minimum: 1
                            default: 1
                        required:
                          - total
                          - count
                          - per_page
                          - current_page
                          - total_pages
                  links:
                    title: Response Links on listing operations
                    description: >-
                      Requests that return multiple items include a `links` attribute, with links related to request's
                      context.
                    type: object
                    properties:
                      self:
                        description: Current response link.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      first:
                        description: Link to the first page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      last:
                        description: Link to the previous page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      next:
                        description: Link to the next page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                    required:
                      - self
                      - first
                      - last
                required:
                  - data
                  - meta
                  - links
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
    post:
      operationId: createElement
      tags:
        - Elements
      summary: Create an Element (Asset)
      description: >
        Creates a new of Element, which represent the Assets managed in Infraspeak.


        This operation requires associating the new Element with a Category, Location, and Maintenance Policy via their
        respective IDs in the request body.


        Please refer to the **Request Body schema definition below** for detailed descriptions of all fields,

        specific validation rules (e.g., allowed types for `category_id` and `local_id`), mandatory fields (`required`),
        constraints, and examples.
      requestBody:
        content:
          application/json:
            schema:
              description: Payload required to create a new Element (Asset)
              type: object
              properties:
                nfc_code:
                  description: |
                    Optional NFC code for the Element.
                    When available, it can help to quickly identify the Element.
                  type:
                    - string
                    - 'null'
                  examples:
                    - ABC1
                bar_code:
                  description: |
                    Optional bar code for the Element.
                    When available, it can help to quickly identify the Element.
                  type:
                    - string
                    - 'null'
                  examples:
                    - 123C
                latitude:
                  description: |
                    Optional geographic latitude coordinate for the Element's precise location.
                    Essential for visualizing where the Element is on the map.
                    - Required when longitude is filled
                  type:
                    - number
                    - 'null'
                  examples:
                    - -8.189341
                longitude:
                  description: |
                    Optional geographic longitude coordinate for the Element's precise location.
                    Essential for visualizing where the Element is on the map.
                    - Required when latitude is filled
                  type:
                    - number
                    - 'null'
                  examples:
                    - 5.1893312
                observation:
                  description: Optional notes, remarks, or additional descriptive information about the Element.
                  type:
                    - string
                    - 'null'
                  examples:
                    - A blue chair
                code:
                  description: |
                    Optional code for the Element within its context (e.g., within the Entity or Category).
                    Useful for quick reference or integration purposes.
                  type:
                    - string
                    - 'null'
                  examples:
                    - 123A
                category_id:
                  description: >
                    Mandatory ID of the associated Category.

                    - Must reference a Category from `GET /categories/all`.

                    - The Category must be of type "TYPE_OF_EQUIPMENT". Categories of type "SOFT_MAINTENANCE" are NOT
                    allowed.
                  type: integer
                  examples:
                    - 123
                local_id:
                  description: >
                    Mandatory ID of the associated Location (where the Element is situated).

                    - Must reference a Location from `GET /locations`.

                    - The Location must be of type "location". Locations of type "building" or "location-folder" are NOT
                    allowed.
                  type: integer
                  examples:
                    - 345
                maintenance_policy_id:
                  description: |
                    Mandatory ID of the associated Maintenance Policy.
                    - Must reference a Maintenance Policy from `GET /maintenance-policies`.
                    - The Maintenance Policy must belong to the same Category specified in `category_id`.
                  type: integer
                  examples:
                    - 678
                acquisition_cost:
                  description: |
                    Optional acquisition Cost of the element. Required with:
                    - lifetime
                    - residual_value
                  type:
                    - number
                    - 'null'
                  examples:
                    - 12.3
                acquisition_date:
                  description: |
                    Optional date (and time) when the Element was acquired (or put into service).
                    Uses ISO 8601 `date-time` format.
                  type:
                    - string
                    - 'null'
                  format: date-time
                  examples:
                    - '2020-08-28 17:12:00'
                supplier_name:
                  description: Optional name of the vendor or supplier from whom the Element was acquired.
                  type:
                    - string
                    - 'null'
                  examples:
                    - Global Tech Solutions Inc.
                lifetime:
                  description: |
                    Optional expected useful lifetime of the Element in years.
                    Used for depreciation or replacement planning.
                    For this field, `acquisition_cost` is required.
                  type:
                    - number
                    - 'null'
                  examples:
                    - 10.2
                residual_value:
                  description: |
                    Optional estimated residual or salvage value of the Element at the end of its useful lifetime.
                    For this field, `acquisition_cost` is required.
                  type:
                    - number
                    - 'null'
                  examples:
                    - 7
                stoppage_cost:
                  description: Optional estimated cost incurred of downtime if this Element fails or stops working.
                  type:
                    - number
                    - 'null'
                  examples:
                    - 25
                element_uuid:
                  description: >
                    Optional universal unique identifier (UUID) supplied by the client for the element.

                    If omitted, the server generates a creation time.

                    Providing a UUID can support idempotent creation patterns. Allowing offline creation (such as from
                    the mobile app).
                  type:
                    - string
                    - 'null'
                  format: uuid
                  examples:
                    - f81d4fae-7dec-11d0-a765-00a0c91e6bf6
              required:
                - category_id
                - local_id
                - maintenance_policy_id
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: Element
                    description: Represents an Element (Asset) structure details
                    type: object
                    properties:
                      id:
                        description: The unique string identifier of the Element record.
                        type: string
                        readOnly: true
                        examples:
                          - '123'
                      type:
                        description: The resource type. Always 'element' for Element records.
                        type: string
                        enum:
                          - element
                        readOnly: true
                        examples:
                          - element
                      attributes:
                        description: An object containing the Element's attributes.
                        type: object
                        properties:
                          cost_center_id:
                            description: The ID of the Cost Center associated with this Element, if available.
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 758
                          type:
                            description: |
                              The specific type of the Element.
                              Allowing to identify if a Element is a equipment or local
                            type: string
                            enum:
                              - LOCAL
                              - EQUIPMENT
                            examples:
                              - EQUIPMENT
                          barcode:
                            description: The barcode value associated with the Element, if available.
                            type:
                              - string
                              - 'null'
                            examples:
                              - N123T
                          code:
                            description: The assigned code or identifier for the Element, often used for quick reference.
                            type:
                              - string
                              - 'null'
                            examples:
                              - 123A
                          created_at:
                            description: |
                              The timestamp when the Element record was created.
                              This field uses the ISO 8601 format.
                            type: string
                            format: date-time
                            readOnly: true
                            examples:
                              - '2019-06-22T17:26:27.000000Z'
                          date_deleted:
                            description: The timestamp when the Element was marked as deleted (soft delete). Null if not deleted.
                            type:
                              - string
                              - 'null'
                            format: date-time
                            readOnly: true
                            examples:
                              - null
                          element_id:
                            description: The unique numeric identifier for the Element record (matches the top-level 'id').
                            type: integer
                            readOnly: true
                            examples:
                              - 123
                          element_uuid:
                            description: The universally unique identifier (UUID) for the Element record.
                            type: string
                            format: uuid
                            readOnly: true
                            examples:
                              - f81d4fae-7dec-11d0-a765-00a0c91e6bf6
                          entity_id:
                            description: The ID of the parent Entity this Element belongs to.
                            type: integer
                            examples:
                              - 456
                          failures_count:
                            description: A counter indicating the number of open Failures (Work orders) for this element.
                            type: integer
                            readOnly: true
                            examples:
                              - 0
                          has_bar_code:
                            description: Flag indicating whether the Element has an associated barcode.
                            type: boolean
                            examples:
                              - false
                          has_nfc:
                            description: Flag indicating whether the Element is equipped with an NFC tag.
                            type: boolean
                            examples:
                              - true
                          has_pmp:
                            description: |
                              Flag indicating whether the element has PMP (Preventive Maintenance Plan)
                              * Only present when the query parameter `showHasPMP` is set to true
                            type: boolean
                            examples:
                              - false
                          is_direct_page_accessible:
                            description: Flag indicating whether the element is accessible from Direct pages.
                            type: boolean
                            examples:
                              - true
                          is_from_network:
                            description: >-
                              Flag indicating whether the element is part of the Network feature (if it has been
                              shared).
                            type: boolean
                            examples:
                              - false
                          last_modified:
                            description: |
                              The timestamp of the last recorded modification or action related to the Element.
                              This field uses the DATETIME format (YYYY-MM-DD HH:MM:SS).
                            type:
                              - string
                              - 'null'
                            readOnly: true
                            examples:
                              - '2024-07-25 12:57:33'
                          latitude:
                            description: The geographical latitude coordinate of the Element, if available.
                            type:
                              - number
                              - 'null'
                            format: float
                            examples:
                              - 41.1458
                          local_id:
                            description: The ID of the Local (Location) where this Element belongs.
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 445
                          longitude:
                            description: The geographical longitude coordinate of the Element, if available.
                            type:
                              - number
                              - 'null'
                            format: float
                            examples:
                              - 42.1458
                          maintenance_policy_id:
                            description: The ID of the Maintenance Policy associated with this Element, if available.
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 659
                          matched_element:
                            title: MatchedElement
                            description: |
                              The matched element associated with this element.
                            type:
                              - object
                              - 'null'
                            properties:
                              type:
                                description: The type of the matched element
                                type: string
                                enum:
                                  - LOCAL
                                  - EQUIPMENT
                                examples:
                                  - EQUIPMENT
                              code:
                                description: Code of the matched element
                                type: string
                                examples:
                                  - ASSET.1.CODE
                              id:
                                description: ID of the matched element
                                type: integer
                                examples:
                                  - 12
                              is_from_network:
                                description: Flag that indicates if the matched element is from network or not
                                type: boolean
                                examples:
                                  - false
                          metering:
                            description: >
                              Element measurements in array format

                              * Only available for the single-item element endpoint

                              * Only present when the query parameter `showMeteringData` is set to true, and if there
                              are any measurements. Otherwise, the field will not be sent
                            type: array
                            items:
                              type: object
                              properties:
                                type:
                                  description: The type of measurement
                                  type: string
                                  enum:
                                    - RANGE
                                    - TEXT
                                    - CUMULATIVE
                                    - CATALOG
                                    - AUDIT
                                  examples:
                                    - CATALOG
                                category_metering_id:
                                  description: The ID of the Category Metering associated with this measurement.
                                  type: integer
                                  examples:
                                    - 1
                                element_registry_id:
                                  description: The ID of the Element Registry associated with this measurement.
                                  type: integer
                                  examples:
                                    - 2
                                max_value:
                                  description: The maximum value of this measurement
                                  type:
                                    - number
                                    - 'null'
                                  examples:
                                    - 15
                                min_value:
                                  description: The minimum value of this measurement
                                  type:
                                    - number
                                    - 'null'
                                  examples:
                                    - 5
                                name:
                                  description: Name of this measurement.
                                  type: string
                                  examples:
                                    - Lorem
                                statistics:
                                  description: Current measurement statistics
                                  oneOf:
                                    - description: Standard statistic for most types of measurements
                                      type: object
                                      properties:
                                        max:
                                          description: The maximum value of this statistic
                                          type: string
                                          examples:
                                            - '235'
                                        min:
                                          description: The minimum value of this statistic
                                          type: string
                                          examples:
                                            - '2'
                                        avg:
                                          description: The average value of this statistic
                                          type: string
                                          examples:
                                            - '109.17'
                                        stddev_samp:
                                          description: >
                                            The sample standard deviation of the metering readings.

                                            Indicates the data point spread around the average.

                                            Lower values mean data is closer to the average; higher values indicate a
                                            wider spread.
                                          type: string
                                          examples:
                                            - '100.68'
                                    - description: Statistics for `CATALOG` measurements type
                                      type: object
                                      properties:
                                        last_value:
                                          description: The last value of this measurement was recorded
                                          type: string
                                          examples:
                                            - option1
                                        las_reading_time:
                                          description: The date of the last value of this measurement was recorded
                                          type: string
                                          examples:
                                            - '2021-11-24T15:25:25+00:00'
                                unit:
                                  description: Name of the type of measurement unit.
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - UN
                                values:
                                  type: array
                                  items: {}
                          nfc_code:
                            description: The element's NFC tag code, if available.
                            type:
                              - string
                              - 'null'
                            examples:
                              - A123B
                          observation:
                            description: Optional notes or observations recorded for the Element.
                            type:
                              - string
                              - 'null'
                            examples:
                              - Lorem ipsum dolor sit amet, consectetur adipiscing elit
                          updated_at:
                            description: |
                              The timestamp when the Element record was last updated.
                              This field uses the ISO 8601 format.
                            type: string
                            format: date-time
                            readOnly: true
                            examples:
                              - '2025-01-31T12:34:48.000000Z'
                        required:
                          - element_id
                          - type
                          - code
                          - entity_id
                          - observation
                          - has_nfc
                          - has_bar_code
                          - date_deleted
                          - failures_count
                          - nfc_code
                          - barcode
                          - last_modified
                          - local_id
                          - latitude
                          - longitude
                          - is_from_network
                          - element_uuid
                          - is_direct_page_accessible
                          - cost_center_id
                          - created_at
                          - updated_at
                      meta:
                        type: object
                        properties:
                          custom_fields:
                            type:
                              - object
                              - 'null'
                            additionalProperties:
                              oneOf:
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - SELECT
                                      examples:
                                        - SELECT
                                    value:
                                      description: The current values of the Custom Field in this resource
                                      type:
                                        - array
                                        - 'null'
                                      items:
                                        type: object
                                        properties:
                                          option_id:
                                            description: The ID of the selected option
                                            type: integer
                                            examples:
                                              - 123
                                          option_code:
                                            description: The code of the selected option
                                            type:
                                              - string
                                              - 'null'
                                            examples:
                                              - OP01
                                          value:
                                            description: The value of the selected option
                                            type: string
                                            examples:
                                              - My Option 1
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: The type settings for the Custom Field
                                          type: object
                                          properties:
                                            allow_multiple_selection:
                                              description: Indicates if the Custom Field supports selecting multiple values
                                              type: boolean
                                              examples:
                                                - true
                                            managed_by_integrations:
                                              description: Indicates if the Custom Field options are only managed by integrations
                                              type: boolean
                                              examples:
                                                - true
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - TEXT
                                      examples:
                                        - TEXT
                                    value:
                                      description: The current value of the Custom Field in this resource
                                      type:
                                        - string
                                        - 'null'
                                      examples:
                                        - abc
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: >-
                                            The type settings for the Custom Field (Empty for Custom Fields of type
                                            TEXT)
                                          type: object
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - BOOLEAN
                                      examples:
                                        - BOOLEAN
                                    value:
                                      description: The current value of the Custom Field in this resource
                                      type:
                                        - boolean
                                        - 'null'
                                      examples:
                                        - true
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: >-
                                            The type settings for the Custom Field (There are none for the Custom Field
                                            Boolean type)
                                          type: object
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - RELATIONSHIP
                                      examples:
                                        - RELATIONSHIP
                                    value:
                                      description: The current values of the Custom Field in this resource
                                      type:
                                        - array
                                        - 'null'
                                      items:
                                        type: object
                                        properties:
                                          related_to_type:
                                            description: The type of object that is selected as the Custom Field Values
                                            type: string
                                            enum:
                                              - CLIENT
                                              - CONTACT
                                            examples:
                                              - CLIENT
                                          related_to_id:
                                            description: The ID of object that is selected as the Custom Field Value
                                            type: integer
                                            examples:
                                              - 123
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: The type settings for the Custom Field
                                          type: object
                                          properties:
                                            allow_multiple_selection:
                                              description: Indicates if the Custom Field allows multiple selection
                                              type: boolean
                                              examples:
                                                - false
                                            relationship_object:
                                              description: The type of object that is selected as the Custom Field Values
                                              type: string
                                              enum:
                                                - CLIENT
                                                - CONTACT
                                              examples:
                                                - CLIENT
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - DATETIME
                                      examples:
                                        - DATETIME
                                    value:
                                      description: The current value of the Custom Field in this resource
                                      type:
                                        - string
                                        - 'null'
                                      format: date-time
                                      examples:
                                        - '2025-12-12 12:39:00'
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: The type settings for the Custom Field
                                          type: object
                                          properties:
                                            allow_past_dates:
                                              description: Indicates if this Custom Field support past dates
                                              type: boolean
                                              examples:
                                                - false
                                            allow_future_dates:
                                              description: Indicates if this Custom Field support future dates
                                              type: boolean
                                              examples:
                                                - true
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - NUMBER
                                      examples:
                                        - NUMBER
                                    value:
                                      description: The current value of the Custom Field in this resource
                                      type:
                                        - integer
                                        - 'null'
                                      examples:
                                        - 12
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: The type settings for the Custom Field
                                          type: object
                                          properties:
                                            min:
                                              description: Indicates the minimum value for the Custom Field
                                              type:
                                                - integer
                                                - 'null'
                                              examples:
                                                - 1
                                            max:
                                              description: Indicates the maximum value for the Custom Field
                                              type:
                                                - integer
                                                - 'null'
                                              examples:
                                                - 3
                              discriminator:
                                propertyName: field_type
                    required:
                      - id
                      - type
                      - attributes
                  included:
                    description: >
                      List of related resources to be included in the response.

                      * The related resources will be present according to the parameters that have been sent via the
                      `expanded` query parameter
                    type: array
                    items:
                      anyOf:
                        - title: AndroidElementAuditStats
                          description: >
                            Audit Stats of an element

                            Details maximum potential, current recorded, and current achievable maximum values from
                            audit measurements.

                            * Schema used only for the Android application
                          type: object
                          properties:
                            id:
                              description: The unique string identifier of the Audit Stats record.
                              type:
                                - string
                                - 'null'
                              examples:
                                - '123'
                            type:
                              description: The resource type. Always 'audit_stats' for Audit Stats records.
                              type: string
                              enum:
                                - audit_stats
                              examples:
                                - audit_stats
                            attributes:
                              description: An object containing the Audit Stats attributes.
                              type: object
                              properties:
                                max_value:
                                  description: |
                                    The maximum potential value or weight defined for this measurement category
                                    associated with the asset. It represents the sum of the maximum weights
                                    of all related catalog entries for this category.
                                  type: number
                                  examples:
                                    - 100
                                current_value:
                                  description: |
                                    The current value or weight recorded for this measurement. If no value
                                    has been recorded, this will be 0.
                                  type: number
                                  examples:
                                    - 75
                                current_max_value:
                                  description: |
                                    The current maximum potential value achievable based on the recorded
                                    measurements. It sums the maximum weights for the catalog entries that
                                    currently have a recorded value.
                                  type: number
                                  examples:
                                    - 100
                              required:
                                - max_value
                                - current_value
                                - current_max_value
                          required:
                            - id
                            - type
                            - attributes
                        - title: ElementAuditStats
                          description: >
                            Audit Stats of an element

                            Details maximum potential, current recorded, and current achievable maximum values from
                            audit measurements.
                          type: object
                          properties:
                            id:
                              description: The unique string identifier of the Audit Stats record.
                              type:
                                - string
                                - 'null'
                              examples:
                                - '123'
                            type:
                              description: The resource type. Always 'audit_stats' for Audit Stats records.
                              type: string
                              enum:
                                - audit_stats
                              examples:
                                - audit_stats
                            attributes:
                              description: An object containing the Audit Stats attributes.
                              type: object
                              properties:
                                category_id:
                                  description: The ID of the Category associated with this Audit Stats.
                                  type: integer
                                  examples:
                                    - 1
                                max_value:
                                  description: |
                                    The maximum potential value or weight defined for this measurement category
                                    associated with the asset. It represents the sum of the maximum weights
                                    of all related catalog entries for this category.
                                  type: number
                                  examples:
                                    - 100
                                current_value:
                                  description: |
                                    The current value or weight recorded for this measurement. If no value
                                    has been recorded, this will be 0.
                                  type: number
                                  examples:
                                    - 75
                                current_max_value:
                                  description: |
                                    The current maximum potential value achievable based on the recorded
                                    measurements. It sums the maximum weights for the catalog entries that
                                    currently have a recorded value.
                                  type: number
                                  examples:
                                    - 100
                                schedule_work_id:
                                  description: The ID of the Schedule Work associated with this Audit Stats.
                                  type: integer
                                  examples:
                                    - 2
                              required:
                                - max_value
                                - current_value
                                - current_max_value
                                - category_id
                                - schedule_work_id
                          required:
                            - id
                            - type
                            - attributes
                        - title: ElementCharacteristic
                          description: Element Characteristic structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Element Characteristic
                              type: string
                              readOnly: true
                              examples:
                                - '123'
                            type:
                              description: The resource type. Always 'element-characteristic' for ElementCharacteristic records.
                              type: string
                              enum:
                                - element-characteristic
                              readOnly: true
                              examples:
                                - element-characteristic
                            attributes:
                              type: object
                              properties:
                                element_characteristic_id:
                                  description: ID of the Element Characteristic
                                  type: integer
                                  examples:
                                    - 123
                                element_id:
                                  description: ID of the associated Element
                                  type: integer
                                  examples:
                                    - 327
                                characteristic_id:
                                  description: ID of the associated Characteristic
                                  type: integer
                                  examples:
                                    - 587
                                value:
                                  description: >-
                                    Value of the Element Characteristic. The type of this value depends on the
                                    characteristic_type (can be text or number or null)
                                  oneOf:
                                    - type: string
                                      examples:
                                        - Good
                                    - type: number
                                      examples:
                                        - 147.85
                                    - type: 'null'
                                material_id:
                                  description: ID of the associated Material
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 687
                                quantity:
                                  description: Quantity of the material
                                  type:
                                    - number
                                    - 'null'
                                  examples:
                                    - 893
                                characteristic_catalog_id:
                                  description: ID of the associated Characteristic Catalog
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 687
                                is_from_network:
                                  description: Whether the Element Characteristic is received from the network
                                  type: boolean
                                  examples:
                                    - false
                              required:
                                - element_characteristic_id
                                - element_id
                                - characteristic_id
                                - value
                                - material_id
                                - quantity
                                - characteristic_catalog_id
                                - is_from_network
                          required:
                            - id
                            - type
                            - attributes
                        - title: ElementEconomic
                          description: Element Economic model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Element Economic
                              type: string
                              examples:
                                - '123'
                              readOnly: true
                            type:
                              description: The resource type. Always 'element_economic' for ElementEconomic records.
                              type: string
                              enum:
                                - element_economic
                              examples:
                                - element_economic
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                element_economic_id:
                                  description: ID of the Element Economic
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 123
                                  readOnly: true
                                acquisition_cost:
                                  description: Acquisition cost of the Element
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - '25.9'
                                lifetime:
                                  description: Lifetime of the Element
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 3
                                supplier_name:
                                  description: Name of the Element Supplier
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - John Doe
                                acquisition_date:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - type:
                                        - string
                                        - 'null'
                                      examples:
                                        - '2020-08-28 17:12:00'
                                      readOnly: true
                                stoppage_cost:
                                  description: Stoppage cost of the Element
                                  type:
                                    - number
                                    - 'null'
                                  examples:
                                    - 75.9
                                residual_value:
                                  description: Residual value of the Element
                                  type:
                                    - number
                                    - 'null'
                                  examples:
                                    - 2
                                actual_value:
                                  description: Actual value of the Element
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - '75.85'
                                annual_depreciation:
                                  description: Annual depreciation of the Element
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - '54.3687'
                                deperciation_tax:
                                  description: |
                                    Depreciation tax of the Element
                                    * Yes, we have a typo here
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - '50.00'
                                month_life:
                                  description: Month life of the Element
                                  type:
                                    - number
                                    - 'null'
                                  examples:
                                    - 1
                                monthly_depreciation:
                                  description: Monthly depreciation of the Element
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - '0.9542'
                                total_depreciated:
                                  description: Total depreciation of the Element
                                  type:
                                    - string
                                    - 'null'
                                detailed_costs_not_scheduled:
                                  description: Array of detailed not scheduled costs. (Can be an empty array)
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      label:
                                        description: Label of the cost
                                        type: string
                                        examples:
                                          - 5-2025
                                      group_start_time:
                                        type:
                                          - string
                                          - 'null'
                                        format: date-time
                                        examples:
                                          - '2025-05-01 00:00:00+00'
                                        readOnly: true
                                      labor_cost:
                                        description: The labor cost
                                        type: string
                                        examples:
                                          - '0.00'
                                      cumulative_labor_cost:
                                        description: The cumulative labor cost
                                        type: string
                                        examples:
                                          - '0.00'
                                      material_cost:
                                        description: The material cost
                                        type: string
                                        examples:
                                          - '0.00'
                                      cumulative_material_cost:
                                        description: The cumulative material cost
                                        type: string
                                        examples:
                                          - '0.00'
                                      cumulative_total_cost:
                                        description: The cumulative total cost
                                        type: string
                                        examples:
                                          - '0.00'
                                detailed_costs_scheduled:
                                  description: Array of detailed scheduled costs. (Can be an empty array)
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      label:
                                        description: Label of the cost
                                        type: string
                                        examples:
                                          - 5-2025
                                      group_start_time:
                                        type:
                                          - string
                                          - 'null'
                                        format: date-time
                                        examples:
                                          - '2025-05-01 00:00:00+00'
                                        readOnly: true
                                      labor_cost:
                                        description: The labor cost
                                        type: string
                                        examples:
                                          - '0.00'
                                      cumulative_labor_cost:
                                        description: The cumulative labor cost
                                        type: string
                                        examples:
                                          - '0.00'
                                      material_cost:
                                        description: The material cost
                                        type: string
                                        examples:
                                          - '0.00'
                                      cumulative_material_cost:
                                        description: The cumulative material cost
                                        type: string
                                        examples:
                                          - '0.00'
                                      cumulative_total_cost:
                                        description: The cumulative total cost
                                        type: string
                                        examples:
                                          - '0.00'
                                detailed_costs_failure:
                                  description: Array of detailed failure costs. (Can be an empty array)
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      label:
                                        description: Label of the cost
                                        type: string
                                        examples:
                                          - 5-2025
                                      group_start_time:
                                        type:
                                          - string
                                          - 'null'
                                        format: date-time
                                        examples:
                                          - '2025-05-01 00:00:00+00'
                                        readOnly: true
                                      labor_cost:
                                        description: The labor cost
                                        type: string
                                        examples:
                                          - '0.00'
                                      cumulative_labor_cost:
                                        description: The cumulative labor cost
                                        type: string
                                        examples:
                                          - '0.00'
                                      material_cost:
                                        description: The material cost
                                        type: string
                                        examples:
                                          - '0.00'
                                      cumulative_material_cost:
                                        description: The cumulative material cost
                                        type: string
                                        examples:
                                          - '0.00'
                                      cumulative_total_cost:
                                        description: The cumulative total cost
                                        type: string
                                        examples:
                                          - '0.00'
                              required:
                                - element_economic_id
                                - acquisition_cost
                                - lifetime
                                - supplier_name
                                - acquisition_date
                                - stoppage_cost
                                - residual_value
                                - actual_value
                                - annual_depreciation
                                - deperciation_tax
                                - month_life
                                - monthly_depreciation
                                - total_depreciated
                          required:
                            - id
                            - type
                            - attributes
                        - title: ElementNetworkSharedMapping
                          description: Represents the mapping of an Element (Asset) through the Network
                          type: object
                          properties:
                            id:
                              description: The unique string identifier of the Element Network Shared Mapping  record.
                              type:
                                - string
                                - 'null'
                              examples:
                                - '123'
                            type:
                              description: >-
                                The resource type. Always 'element_network_shared_mapping' for Element Network Shared
                                Mapping records.
                              type: string
                              enum:
                                - element_network_shared_mapping
                              examples:
                                - element_network_shared_mapping
                            attributes:
                              description: An object containing the Element Network Shared Mapping attributes.
                              type: object
                              properties:
                                element_id:
                                  description: The ID of the Element that was shared
                                  type: integer
                                  examples:
                                    - 22
                                  readOnly: true
                                entity_id:
                                  description: The ID of the Entity associated with the Element.
                                  type: integer
                                  examples:
                                    - 12
                                receiver_id:
                                  description: The ID of the receiver (Entity) to which the Element has been shared.
                                  type: integer
                                  examples:
                                    - 214
                                receiver_type:
                                  description: The type of receiver
                                  type: string
                                  enum:
                                    - CLIENT
                                    - SUPPLIER
                                  examples:
                                    - SUPPLIER
                                created_at:
                                  description: |
                                    The timestamp when the record was created.
                                    This field uses the ISO 8601 format.
                                  type: string
                                  format: date-time
                                  examples:
                                    - '2019-06-22T17:26:27.000000Z'
                                updated_at:
                                  description: |
                                    The timestamp when the record was last updated.
                                    This field uses the ISO 8601 format.
                                  type: string
                                  format: date-time
                                  examples:
                                    - '2025-01-31T12:34:48.000000Z'
                              required:
                                - element_id
                                - entity_id
                                - receiver_id
                                - receiver_type
                                - created_at
                                - updated_at
                          required:
                            - id
                            - type
                            - attributes
                        - title: ElementOtherCost
                          description: Element Other Cost model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Element Other Cost
                              type: string
                              examples:
                                - '123'
                              readOnly: true
                            type:
                              description: The resource type. Always 'element_other_cost' for Element Other Cost records.
                              type: string
                              enum:
                                - element_other_cost
                              examples:
                                - element_other_cost
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                element_other_cost_id:
                                  description: >-
                                    The unique numeric identifier for the Element Other Cost record (matches the
                                    top-level 'id').
                                  type: integer
                                  examples:
                                    - 123
                                  readOnly: true
                                element_id:
                                  description: ID of the associated Element
                                  type: integer
                                  examples:
                                    - 123
                                other_cost_id:
                                  description: ID of the associated Other Cost
                                  type: integer
                                  examples:
                                    - 123
                                entity_id:
                                  description: ID of the associated Entity
                                  type: integer
                                  examples:
                                    - 123
                                operator_id:
                                  description: ID of the associated Operator
                                  type: integer
                                  examples:
                                    - 123
                                numeric_value:
                                  description: Numeric value of the Element Other Cost
                                  type:
                                    - number
                                    - 'null'
                                  examples:
                                    - 1.2
                                start_time:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  examples:
                                    - '2020-08-28T17:12:00.000Z'
                                  readOnly: true
                                end_time:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  examples:
                                    - '2020-08-28T17:12:00.000Z'
                                  readOnly: true
                                description:
                                  description: A description about the Element Other Cost
                                  type:
                                    - string
                                    - 'null'
                                interval_value:
                                  description: The duration of the ElementOtherCost in the format (HH-MM-SS)
                                  type: string
                                  examples:
                                    - '00:15'
                                updated_date:
                                  type: string
                                  format: date-time
                                  examples:
                                    - '2020-08-28T17:12:00.000Z'
                                  readOnly: true
                                cost:
                                  description: The cost of the Element Other Cost
                                  type: number
                                  examples:
                                    - 1.2
                          required:
                            - id
                            - type
                            - attributes
                        - title: ElementRegistry
                          description: Represents an Element Registry (Asset Registry) structure details
                          type: object
                          properties:
                            id:
                              description: The unique string identifier of the Element Registry record.
                              type: string
                              readOnly: true
                              examples:
                                - '123'
                            type:
                              description: The resource type. Always 'element_registry' for Element Registry records.
                              type: string
                              enum:
                                - element_registry
                              readOnly: true
                              examples:
                                - element_registry
                            attributes:
                              description: An object containing the Element Registry's attributes.
                              type: object
                              properties:
                                element_registry_id:
                                  description: >-
                                    The unique numeric identifier for the Element Registry record (matches the top-level
                                    'id').
                                  type: integer
                                  examples:
                                    - 123
                                maintenance_procedure_id:
                                  description: >-
                                    The ID of the Maintenance Procedure associated with this Element Registry, if
                                    available.
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 345
                                operator_id:
                                  description: |
                                    The ID of the Operator associated with this Element Registry, if available.
                                    - Helps identify the operator who performed the action that generated the record
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 456
                                work_id:
                                  description: |
                                    The ID of the Work associated with this Element Registry, if available.
                                    - Works are also described in the application as `Planned Jobs`.
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 567
                                schedule_work_id:
                                  description: |
                                    The ID of the Scheduled Work associated with this Element Registry, if available.
                                    - Scheduled Works are also described in the application as `Planned jobs orders`.
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 678
                                status:
                                  description: Indicates the status of the Element Register
                                  type: string
                                  enum:
                                    - PENDING
                                    - CANCELED
                                    - ACTIVE
                                    - COMPLETED
                                  examples:
                                    - COMPLETED
                                element_id:
                                  description: The ID of the Element (Asset) associated with this Element Registry, if available.
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 987
                                start_time:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: |
                                        The timestamp for when the action was started
                                        - Not all actions have a **start_time**
                                        - An example of an action with **start_time** is `SCHEDULED_WORK`
                                      type:
                                        - string
                                        - 'null'
                                end_time:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: |
                                        The timestamp for when the action was finished
                                        - Not all actions have a **end_time**
                                        - An example of an action with **end_time** is `SCHEDULED_WORK`
                                      type:
                                        - string
                                        - 'null'
                                observation:
                                  description: Optional notes or observations recorded for the Element Registry.
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - Lorem ipsum dolor sit amet, consectetur adipiscing elit
                                entity_id:
                                  description: The ID of the parent Entity this Element belongs to.
                                  type: integer
                                  examples:
                                    - 456
                                action:
                                  description: >
                                    The performed action that generated the Element Registry

                                    - Actions can refer to the Element, or they can be about other resources linked to
                                    the Element in some way
                                  type: string
                                  enum:
                                    - ADD_COST
                                    - ADDED
                                    - ADDED_COST_CENTER
                                    - CHANGE_BAR_CODE
                                    - CHANGED_COST_CENTER
                                    - CHANGE_ELEMENT_STATUS
                                    - CHANGE_HOUSEKEEPER_OBSERVATION
                                    - CHANGE_HOUSEKEEPER_STATUS
                                    - CHANGE_IDENTIFIER
                                    - CHANGE_LOCAL
                                    - CHANGE_POLICY
                                    - CHANGE_WORK_ORDER_LOCAL
                                    - DELETE_COST
                                    - DELETED
                                    - DELETED_COST_CENTER
                                    - EDIT_COST
                                    - EDIT_ELEMENT_CHARACTERISTICS
                                    - FAILURE_TASK
                                    - MAINTENANCE_PROCEDURE
                                    - MANUAL_TASK
                                    - NEW_FAILURE
                                    - REMOVE_BAR_CODE
                                    - REMOVE_IDENTIFIER
                                    - SCHEDULED_WORK
                                    - SPECIAL_WORK
                                    - VISIT_BAR_CODE
                                    - VISIT_MANUAL
                                    - VISIT_NFC
                                  examples:
                                    - ADD_COST
                                failure_id:
                                  description: ID of the failure
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 789
                                intervention_id:
                                  description: ID of the intervention
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 875
                                duration:
                                  description: Duration of the action
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - 12 days 22:21:25
                                intervention_estimated_time:
                                  description: >-
                                    Estimate time, in format H:m:s, configured at Intervention level on the moment the
                                    Scheduled Work was completed
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - '01:21:25'
                                maintenance_procedure_estimated_time:
                                  description: >-
                                    Estimated time, in format H:m:s, configured at Task level on the moment the
                                    Scheduled Work was completed
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - '00:41:05'
                                from_local_id:
                                  description: ID of the Local where the action begins
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 756
                                to_local_id:
                                  description: ID of the Local where the action ends
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 755
                                to_maintenance_policy_id:
                                  description: ID of the Maintenance Policy where the action begins
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 742
                                from_maintenance_policy_id:
                                  description: ID of the Maintenance Policy where the action ends
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 364
                                quantity:
                                  description: Quantity used in the action
                                  type:
                                    - number
                                    - 'null'
                                  examples:
                                    - null
                                visit_type:
                                  description: Type of the visit
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - null
                                status_after:
                                  description: Status after the action
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - '1'
                                element_other_cost_id:
                                  description: ID of the element other cost
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 687
                                characteristics_updates:
                                  description: The characteristics updated during the action
                                  type:
                                    - array
                                    - 'null'
                                  items:
                                    type: object
                                    properties:
                                      label:
                                        description: The label of the Characteristic
                                        type: string
                                        examples:
                                          - A05. Weight
                                      newValue:
                                        description: The value after update. Has a mixed type
                                        type: string
                                        examples:
                                          - 2 Kg
                                      oldValue:
                                        description: The value before update. Has a mixed type
                                        type:
                                          - string
                                          - 'null'
                                        examples:
                                          - 6 Kg
                                      characteristicId:
                                        description: The ID of the Characteristic
                                        type: integer
                                        examples:
                                          - 1247
                                element_registry_uuid:
                                  description: The universally unique identifier (UUID) for the Element Registry record.
                                  type: string
                                  format: uuid
                                  readOnly: true
                                  examples:
                                    - f81d4fae-7dec-11d0-a765-00a0c91e6bf6
                                snapshot:
                                  description: >-
                                    A snapshot object containing all the valuable properties affected by the action in
                                    the Assets Registry.
                                  type:
                                    - object
                                    - 'null'
                                  examples:
                                    - {}
                                created_at:
                                  description: |
                                    The timestamp when the Element Registry record was created.
                                    This field uses the ISO 8601 format.
                                  type: string
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2019-06-22T17:26:27.000000Z'
                                updated_at:
                                  description: |
                                    The timestamp when the Element Registry record was last updated.
                                    This field uses the ISO 8601 format.
                                  type: string
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2025-01-31T12:34:48.000000Z'
                              required:
                                - element_registry_id
                                - maintenance_procedure_id
                                - operator_id
                                - work_id
                                - schedule_work_id
                                - status
                                - element_id
                                - start_time
                                - end_time
                                - observation
                                - entity_id
                                - action
                                - failure_id
                                - intervention_id
                                - duration
                                - from_local_id
                                - to_local_id
                                - to_maintenance_policy_id
                                - from_maintenance_policy_id
                                - quantity
                                - visit_type
                                - status_after
                                - element_other_cost_id
                                - characteristics_updates
                                - element_registry_uuid
                                - snapshot
                                - created_at
                                - updated_at
                          required:
                            - id
                            - type
                            - attributes
                        - title: FailureElementNetworkStatus
                          description: Represents the status of an Element (Asset) Failure through the Network
                          type: object
                          properties:
                            id:
                              description: The unique string identifier of the Failure Element Network Status   record.
                              type:
                                - string
                                - 'null'
                              examples:
                                - '123'
                            type:
                              description: >-
                                The resource type. Always 'failure_element_network_status' for Failure Element Network
                                Status records.
                              type: string
                              enum:
                                - failure_element_network_status
                              examples:
                                - failure_element_network_status
                            attributes:
                              description: An object containing the Failure Element Network Status  attributes.
                              type: object
                              properties:
                                element_id:
                                  description: The ID of the Element associated.
                                  type: integer
                                  examples:
                                    - 22
                                  readOnly: true
                                type:
                                  description: The type that identifies the side to which this mapping belongs
                                  type: string
                                  enum:
                                    - SENDER
                                    - RECEIVER
                                  examples:
                                    - SENDER
                                entity_id:
                                  description: The ID of the Entity associated with the Element.
                                  type: integer
                                  examples:
                                    - 12
                                failure_id:
                                  description: The ID of the Failure associated with the Element.
                                  type: integer
                                  examples:
                                    - 15
                                network_element_uuid:
                                  description: The UUID that identifies the Element throughout the Network
                                  type: string
                                  format: uuid
                                  examples:
                                    - e632afe8-a1bf-4702-b5bd-sb51a77dss3
                                network_failure_uuid:
                                  description: The UUID that identifies the Failure throughout the Network
                                  type: string
                                  format: uuid
                                  examples:
                                    - e632afe8-a1bf-4702-b5bd-b1163861ba51
                              required:
                                - entity_id
                                - failure_id
                                - element_id
                          required:
                            - id
                            - type
                            - attributes
                        - title: ElementHealthScoreInfo
                          description: Element Health Score Info model structure details
                          type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - element_health_score_info
                              examples:
                                - element_health_score_info
                            id:
                              type: string
                              example: '1'
                            attributes:
                              type: object
                              properties:
                                element_health_score_info:
                                  type: integer
                                  example: 1
                                health_score_flag:
                                  type: integer
                                  example: 1
                                health_score:
                                  type: number
                                  format: float
                                  example: 0.85
                                last_updated_at:
                                  type: string
                                  format: date-time
                                  examples:
                                    - '2026-02-01T00:00:00+00:00'
                        - title: Category
                          description: Category model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Category
                              type: string
                              examples:
                                - '123'
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - category
                              examples:
                                - category
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                category_id:
                                  description: ID of the Category
                                  type: integer
                                  examples:
                                    - 123
                                  readOnly: true
                                type:
                                  description: >-
                                    The Category type. A "TYPE_OF_EQUIPMENT" Category is directly related to equipments
                                    (e.g. a fridge) and a Category "SOFT_MAINTENANCE" is related to Locations (E.g.
                                    hotel rooms).
                                  type: string
                                  enum:
                                    - SOFT_MAINTENANCE
                                    - TYPE_OF_EQUIPMENT
                                  examples:
                                    - SOFT_MAINTENANCE
                                all_technical_skills:
                                  description: Indicates if this category is associated to all technical skills.
                                  type:
                                    - boolean
                                    - 'null'
                                  examples:
                                    - true
                                code:
                                  description: Code of the Category.
                                  type: string
                                  examples:
                                    - VENT
                                entity_id:
                                  description: Entity ID of the Category.
                                  type: integer
                                  examples:
                                    - 123
                                full_code:
                                  description: Codes of the category's parents concatenated by dot with category code.
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - XYZ.VENT
                                  readOnly: true
                                has_children:
                                  description: Whether the category has subitems or not.
                                  type: boolean
                                  examples:
                                    - true
                                  readOnly: true
                                is_real:
                                  description: Whether the category is a folder (false) or "final" category (true).
                                  type:
                                    - boolean
                                    - 'null'
                                  examples:
                                    - true
                                name:
                                  description: Name of the Category.
                                  type: string
                                  examples:
                                    - Ventilation
                                parent_id:
                                  description: ID of the category parent.
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 123
                            relationships:
                              description: Available relationships of the Category.
                              type: object
                              properties:
                                categoryMeterings:
                                  description: Category Meterings associated to the category.
                                  type: object
                                characteristics:
                                  description: Characteristics associated to the category.
                                  type: object
                                entity:
                                  description: Entity associated to the category.
                                  type: object
                                files:
                                  description: Files associated to the category.
                                  type: object
                                maintenanceProcedures:
                                  description: Maintenance Procedures associated to the category.
                                  type: object
                                maintenancePolicies:
                                  description: Maintenance Policies associated to the category.
                                  type: object
                                problems:
                                  description: Problems associated to the category.
                                  type: object
                                technicalSkills:
                                  description: Technical Skills associated to the category.
                                  type: object
                          required:
                            - id
                            - type
                            - attributes
                        - title: MeteringRegistry
                          description: MeteringRegistry model structure details
                          type: object
                          properties:
                            id:
                              description: ID of MeteringRegistry
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - metering-registry
                            attributes:
                              type: object
                              properties:
                                metering_registry_id:
                                  description: ID of MeteringRegistry
                                  type: integer
                                element_id:
                                  description: ID of Element
                                  type: integer
                                operator_id:
                                  description: ID of Operator
                                  type: integer
                                category_metering_id:
                                  description: ID of Category Metering
                                  type: integer
                                category_metering_catalog_id:
                                  description: ID of Category Metering Catalog
                                  type: integer
                                value:
                                  description: Value of the Metering Registry
                                  type: string
                                weight:
                                  description: Value of the Metering Registry
                                  type:
                                    - integer
                                    - 'null'
                                observation:
                                  description: Observation of the Metering Registry
                                  type: string
                                updated_by:
                                  description: User that updated the Metering Registry
                                  type: string
                                date_created:
                                  description: Date of creation of Metering Registry
                                  type: string
                                automated:
                                  type: boolean
                                last_metering_date:
                                  description: Date of last metering
                                  type: string
                                last_metering_value:
                                  description: Value of last metering
                                  type: string
                                measured_at:
                                  description: Date of measurement
                                  type: string
                                uuid:
                                  description: Uuid of the Metering Registry
                                  type: string
                        - title: MaintenancePolicy
                          description: MaintenancePolicy model structure details
                          type: object
                          properties:
                            id:
                              description: ID of MaintenancePolicy
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - maintenance-policy
                            attributes:
                              type: object
                              properties:
                                maintenance_policy_id:
                                  description: ID of MaintenancePolicy
                                  type: integer
                                name:
                                  description: Maintenance Policy Name
                                  type: string
                                has_cost:
                                  description: Maintenance Policy has cost
                                  type: boolean
                                category_id:
                                  description: ID of Category
                                  type: integer
                        - title: Clients
                          description: Client model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Client
                              type: string
                              examples:
                                - '123'
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - client
                              examples:
                                - client
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                client_id:
                                  description: ID of the Client
                                  type: integer
                                  examples:
                                    - 123
                                client_uuid:
                                  description: UUID of the Client
                                  type: string
                                  format: uuid
                                  examples:
                                    - e632afe8-a1bf-4702-b5bd-b1163861ba51
                                name:
                                  description: Client Name
                                  type: string
                                  examples:
                                    - John Doe
                                code:
                                  description: Client Code
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - JD
                                nif:
                                  description: NIF/ VAT Number of the Client
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - '1234566789'
                                postal_code:
                                  description: Postal Code of the Client
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - 1234-567
                                city:
                                  description: City of the Client
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - Lisbon
                                observations:
                                  description: Additional information
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - abc
                                address:
                                  description: Address of the Client
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - abc
                                country:
                                  description: Country of the Client
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - PT
                                created_at:
                                  description: The datetime of the creation of the Client
                                  type: string
                                  format: date-time
                                  examples:
                                    - '2020-12-03T12:45:00'
                                  readOnly: true
                                updated_at:
                                  description: The datetime of the last update of the Client
                                  type: string
                                  format: date-time
                                  examples:
                                    - '2020-12-03T12:45:00'
                                  readOnly: true
                                has_handshake:
                                  description: Indicates if this Client is "connected" to work on Infraspeak Network.
                                  type: boolean
                                  examples:
                                    - true
                                my_company:
                                  description: Indicates whether it is the entity's default client
                                  type: boolean
                                  examples:
                                    - true
                            relationships:
                              description: The relationships of the Client (Only present when expanded in the request)
                              type: object
                              properties:
                                buildings:
                                  description: The Buildings associated to the Client
                                  type: object
                                contacts:
                                  description: The Contacts associated to the Client
                                  type: object
                                files:
                                  description: The Files associated to the Client
                                  type: object
                                profilePicture:
                                  description: The profile picture of the the Client
                                  type: object
                                operators:
                                  description: The Operators associated to the Client
                                  type: object
                                handshake:
                                  description: The Handshake associated to the Client
                                  type: object
                          required:
                            - id
                            - type
                            - attributes
                        - title: Cost Center
                          description: >
                            Cost Center resource structure details.


                            Cost Centers in Infraspeak can be associated to Lines in Sales and Buy Orders, Failures
                            (Work Orders) or Scheduled Works (Planned Job Orders).
                          type: object
                          properties:
                            id:
                              description: Cost Center ID
                              type: string
                              readOnly: true
                            type:
                              description: Resource type
                              type: string
                              enum:
                                - cost_center
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                name:
                                  description: Name for the Cost Center.
                                  type: string
                                  examples:
                                    - AVAC Corretiva
                                code:
                                  description: Code for the Cost Center
                                  type: string
                                  examples:
                                    - C.AVAC
                                responsible_name:
                                  description: Name for the person responsible for the Cost Center
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - Luis
                                responsible_email:
                                  description: Email for the person responsible for the Cost Center
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - luis@example.com
                                responsible_phone:
                                  description: Phone Number for the person responsible for the Cost Center
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - '+351912345678'
                                responsible_cellphone:
                                  description: Cellphone Number for the person responsible for the Cost Center
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - '+351912345678'
                                observation:
                                  description: User defined Observations for the Cost Center
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - An observation regarding my cost center.
                        - title: Failure
                          description: Failure model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Failure
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - failure
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                failure_id:
                                  description: ID of the Failure
                                  type: integer
                                  readOnly: true
                                  examples:
                                    - 1
                                uuid:
                                  description: Universally Unique Identifier for the Failure
                                  type: string
                                  format: uuid
                                  readOnly: true
                                problem_id:
                                  description: ID of the associated problem
                                  type: integer
                                status:
                                  type: string
                                  enum:
                                    - WAITING_APPROVAL
                                    - WAITING_RESOLUTION
                                    - IN_RESOLUTION
                                    - PAUSED
                                    - COMPLETED
                                    - ARCHIVED
                                  readOnly: true
                                start_date:
                                  type: string
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T08:48:00.000Z'
                                completed_date:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T17:12:00.000Z'
                                approved_date:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T09:30:00.000Z'
                                paused_date:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T13:05:00.000Z'
                                description:
                                  type: string
                                  examples:
                                    - Needs replacement
                                last_status_description:
                                  type: string
                                  examples:
                                    - Completed
                                observations:
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - Needs a new part
                                code:
                                  type: string
                                  examples:
                                    - WO2022
                                fts_vector:
                                  description: Denormalized data of a Failure
                                  type: string
                                priority:
                                  description: Failure priority number being 1 the lowest priority and 4 the highest priority.
                                  type: integer
                                  enum:
                                    - 1
                                    - 2
                                    - 3
                                    - 4
                                client_id:
                                  description: ID of the associated client defined according to the respective `local_id`.
                                  type: integer
                                  readOnly: true
                                entity_id:
                                  description: ID of the Entity of the Failure
                                  type: integer
                                  readOnly: true
                                metering_registry_id:
                                  description: ID of a possible associated metering registry
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                local_id:
                                  description: ID of the location associated to the Failure
                                  type: integer
                                paused_reason_id:
                                  description: ID of the paused reason associated to the Failure
                                  type: integer
                                external_id:
                                  description: External ID to be associated to the Failure
                                  type:
                                    - string
                                    - 'null'
                                report_name:
                                  description: Name of who reported the Failure
                                  type: string
                                solved:
                                  description: Indicates whether the Failure was closed successfully or not
                                  type: boolean
                                  readOnly: true
                                  default: false
                                confirmed:
                                  description: Indicates whether the Failure is confirmed or not
                                  type: boolean
                                  readOnly: true
                                  default: false
                                started:
                                  description: Indicates whether the Failure is started or not
                                  type: boolean
                                  readOnly: true
                                  default: false
                                paused:
                                  description: Indicates whether the Failure is paused or not
                                  type: boolean
                                  readOnly: true
                                  default: false
                                completed:
                                  description: Indicates whether the Failure is completed or not
                                  type: boolean
                                  readOnly: true
                                  default: false
                                archived:
                                  description: Indicates whether the Failure is archived or not
                                  type: boolean
                                  readOnly: true
                                  default: false
                                approved:
                                  description: Indicates whether the Failure is approved or not
                                  type: boolean
                                  readOnly: true
                                  default: false
                                next_schedule:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-29T10:30:00.000Z'
                                message_count:
                                  type: integer
                                  minimum: 0
                                  default: 0
                                  examples:
                                    - 3
                                time_statistics:
                                  type: object
                                  properties:
                                    approved_date:
                                      type:
                                        - string
                                        - 'null'
                                      format: date-time
                                      readOnly: true
                                      examples:
                                        - '2020-08-28T09:30:00.000Z'
                                    last_completed_date:
                                      type:
                                        - string
                                        - 'null'
                                      format: date-time
                                      readOnly: true
                                      examples:
                                        - '2020-08-28T17:12:00.000Z'
                                    last_paused_date:
                                      type:
                                        - string
                                        - 'null'
                                      format: date-time
                                      readOnly: true
                                      examples:
                                        - '2020-08-28T13:05:00.000Z'
                                    started_date:
                                      type:
                                        - string
                                        - 'null'
                                      format: date-time
                                      readOnly: true
                                      examples:
                                        - '2020-08-28T09:45:00.000Z'
                                    time_to_approve:
                                      description: Duration it took to approve the Failure since reported in `ISO8601` format.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - P0Y0M0DT0H42M0S
                                    time_to_complete:
                                      description: Duration it took to complete the Failure since reported in `ISO8601` format.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - P0Y0M0DT8H24M0S
                                    time_to_complete_after_started:
                                      description: >-
                                        Duration it took to complete the Failure since the resolution started in
                                        `ISO8601` format.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - P0Y0M0DT7H27M0S
                                    time_to_start:
                                      description: >-
                                        Duration it took to start the Failure's resolution since reported in `ISO8601`
                                        format.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - P0Y0M0DT0H57M0S
                                    time_to_start_after_approved:
                                      description: >-
                                        Duration it took to start the Failure's resolution since approved in `ISO8601`
                                        format.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - P0Y0M0DT0H15M0S
                                    real_duration:
                                      description: Real duration of the Failure's resolution time in `ISO8601` format.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - P0Y0M0DT7H27M0S
                                supplier_id:
                                  description: ID of the supplier associated to the Failure
                                  type: integer
                                signature_status:
                                  description: Indicates whether the Failure is signed or not
                                  type: string
                                  enum:
                                    - SIGNED
                                    - NOT_SIGNED
                                  default: NOT_SIGNED
                                last_status_change_date:
                                  type: string
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T09:30:00.000Z'
                                approved_by_id:
                                  description: ID of the operator who approved the Failure.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                completed_by_id:
                                  description: ID of the operator who completed the Failure.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                started_by_id:
                                  description: ID of the operator who started the Failure's resolution.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                paused_by_id:
                                  description: ID of the operator who paused the Failure's resolution.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                approved_by:
                                  description: Name of the operator who approved the Failure.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                completed_by:
                                  description: Name of the operator who completed the Failure.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                started_by:
                                  description: Name of the operator who started the Failure's resolution.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                paused_by:
                                  description: Name of the operator who paused the Failure's resolution.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                reported_by:
                                  description: Name of the operator who reported the Failure.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                manpower_duration:
                                  description: Duration of the Failure's manpower time in `ISO8601` format.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                  examples:
                                    - P0Y0M0DT7H27M0S
                                cost_center_id:
                                  description: ID of the cost center associated to the Failure
                                  type:
                                    - integer
                                    - 'null'
                                network_failure_id:
                                  description: ID of the Network Failure
                                  type: integer
                                  readOnly: true
                                  examples:
                                    - 1
                                created_at:
                                  type: string
                                  format: date-time
                                  readOnly: true
                                updated_at:
                                  type: string
                                  format: date-time
                                  readOnly: true
                                date_deleted:
                                  type: string
                                  format: date-time
                                  readOnly: true
                            relationships:
                              type: object
                              properties:
                                approvedBy:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                completedBy:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                createdBy:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                files:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - file
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                location:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - location
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                operator:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                          required:
                            - id
                            - type
                            - attributes
                        - title: Geolocations
                          description: Geolocation model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Geolocation
                              type: string
                              examples:
                                - '1'
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - geolocation
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                related_to_id:
                                  description: Id of Related Object
                                  type: integer
                                  examples:
                                    - 1
                                related_to_type:
                                  description: Type related to
                                  type: string
                                  enum:
                                    - ELEMENT
                                    - LOCAL
                                    - OPERATOR
                                  examples:
                                    - OPERATOR
                                latitude:
                                  description: latitude of the geolocation
                                  type: string
                                  examples:
                                    - '0.0000000'
                                longitude:
                                  description: longitude of the geolocation
                                  type: string
                                  examples:
                                    - '0.0000000'
                                accuracy:
                                  description: accuracy of the geolocation
                                  type: string
                                  examples:
                                    - '10'
                                altitude:
                                  description: altitude of the geolocation
                                  type: string
                                  examples:
                                    - '10'
                                provider:
                                  description: provider of the geolocation
                                  type: string
                                  examples:
                                    - MANUAL
                                states:
                                  description: states of the geolocation
                                  type: array
                                  items:
                                    type: string
                                  examples:
                                    - - WORKING
                                      - FAILURE
                                      - SCHEDULED_WORK
                                thumb:
                                  description: thumbnaill for the map
                                  type: string
                                  examples:
                                    - https://...
                                active:
                                  description: active state of the geolocation
                                  type: boolean
                                  examples:
                                    - true
                                created_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: Date when the Geolocation was created
                                      readOnly: true
                                updated_at:
                                  allOf:
                                    - allOf:
                                        - type:
                                            - string
                                            - 'null'
                                          pattern: >-
                                            ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                            ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                          examples:
                                            - '2021-07-21 18:38:00'
                                        - description: Date when the Geolocation was created
                                          readOnly: true
                                    - description: Date when the Geolocation was last updated
                                label:
                                  description: If related_to_type is 'OPERATOR' then we send his full name as the label
                                  type: string
                                  examples:
                                    - Gabriel Monteiro
                        - title: HousekeeperAssetStatus
                          description: HousekeeperAssetStatus model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the HousekeeperAssetStatus
                              type: string
                              examples:
                                - '1'
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - housekeeper_asset_status
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                status_id:
                                  description: Status Id
                                  type: integer
                                  examples:
                                    - 1
                                element_id:
                                  description: Element Id
                                  type: integer
                                  examples:
                                    - 2
                                observation:
                                  description: Observation
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - Some Observation
                                external_observation:
                                  description: External observation from a PMS Integration
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - Some Observation
                                work_id:
                                  description: ID of the related Work
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 2
                                max_target_status_date:
                                  description: Datetime of the max target status
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  examples:
                                    - '2021-07-20T18:38:00.000Z'
                                assignees:
                                  description: List of the assigned Operators
                                  type:
                                    - array
                                    - 'null'
                                  items:
                                    type: object
                                check_in:
                                  description: Check in
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  examples:
                                    - '2021-07-20T18:38:00.000Z'
                                check_out:
                                  description: Check out
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  examples:
                                    - '2021-07-21T18:38:00.000Z'
                        - title: HousekeeperStatus
                          description: HousekeeperStatus model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the HousekeeperStatus
                              type: string
                              examples:
                                - '1'
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - housekeeper_status
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                status_code:
                                  description: Status code
                                  type: string
                                  examples:
                                    - Status code
                                order:
                                  description: Status order
                                  type: integer
                                  examples:
                                    - 0
                                default:
                                  description: Status order
                                  type: boolean
                                  examples:
                                    - true
                        - title: Location
                          description: Location model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Location
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - location
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                entity_id:
                                  type: integer
                                name:
                                  description: Location name
                                  type: string
                                full_name:
                                  description: Names of the location's parents concatenated by hyphen with location name.
                                  type: string
                                  readOnly: true
                                code:
                                  description: Location code.
                                  type: string
                                full_code:
                                  description: Codes of the location's parents concatenated by dot with location code.
                                  type: string
                                  readOnly: true
                                original_full_code:
                                  description: Location original full code.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                observation:
                                  description: Additional information
                                  type:
                                    - string
                                    - 'null'
                                date_updated:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - '2020-12-03 12:45:00'
                                parent_id:
                                  description: ID of the location parent.
                                  type: integer
                                root_parent_id:
                                  description: ID of the location root parent (of `type` equals to `building`).
                                  type: integer
                                  readOnly: true
                                area:
                                  description: Location area
                                  type:
                                    - number
                                    - 'null'
                                glass_area:
                                  description: Location glass area
                                  type:
                                    - number
                                    - 'null'
                                volume:
                                  description: Location volume
                                  type:
                                    - number
                                    - 'null'
                                orientation:
                                  description: Solar orientation (North, South, West, East)
                                  type:
                                    - string
                                    - 'null'
                                is_from_network:
                                  description: If Location is from network
                                  type: boolean
                                  readOnly: true
                                local_uuid:
                                  description: Location UUID
                                  type: string
                                  format: uuid
                                  readOnly: true
                                assets_count:
                                  description: >-
                                    Cumulative count of assets (equipment) in this location and all its descendants.
                                    Only present when `with_assets_count=true` query parameter is provided.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                associations:
                                  description: >
                                    List of ways the operator is associated with this building. Possible values are
                                    `DIRECT` (via a direct local-operator assignment), `TEAM` (via a team the operator
                                    belongs to), and `CLIENT` (via a client the operator is assigned to).
                                  type: array
                                  items:
                                    type: string
                                    enum:
                                      - DIRECT
                                      - TEAM
                                      - CLIENT
                              required:
                                - name
                                - full_name
                                - code
                                - full_code
                                - observation
                                - date_updated
                            relationships:
                              type: object
                              properties:
                                building:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - building
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                files:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - file
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                operators:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - operator
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                localOrientation:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - localOrientation
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                          required:
                            - id
                            - type
                            - attributes
                        - title: Location type
                          description: Location type model structure details
                          type: object
                          properties:
                            id:
                              description: The ID of the Location Type
                              type: string
                              examples:
                                - '123'
                              readOnly: true
                            type:
                              type: string
                              enum:
                                - location-type
                              examples:
                                - location-type
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                local_type_id:
                                  description: The ID of the Location Type
                                  type: integer
                                  examples:
                                    - 123
                                  readOnly: true
                                name:
                                  description: The name/description of the Location Type
                                  type: string
                                  examples:
                                    - Office
                                usage_type:
                                  description: >-
                                    This is a deprecated field that is no longer used, but it's kept in the response for
                                    backwards compatibility.
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - null
                                usage_number:
                                  description: >-
                                    This is a deprecated field that is no longer used, but it's kept in the response for
                                    backwards compatibility.
                                  type: integer
                                  examples:
                                    - 0
                                entity_id:
                                  description: The ID of the Entity where the Location Type belongs
                                  type: integer
                                  examples:
                                    - 123
                                  readOnly: true
                                general:
                                  description: >-
                                    Indicates if the Location Type is the General Location Type. Every Entity in
                                    Infraspeak contains a General Location Type that cannot be deleted, and all
                                    Locations that don't fit in any other Location Type fall into the General Location
                                    Type.
                                  type: boolean
                                  examples:
                                    - true
                            relationships:
                              description: The relationships of the Location Type (Only present when expanded in the request)
                              type: object
                              properties:
                                categories:
                                  description: The Categories associated with the Location Type
                                  type: object
                          required:
                            - id
                            - type
                            - attributes
                        - title: ProfilePicture
                          description: Represents the standard schema for the resource profile image
                          type: object
                          properties:
                            id:
                              description: The unique string identifier of the Profile Picture record.
                              type:
                                - string
                                - 'null'
                              examples:
                                - '123'
                            type:
                              description: The resource type. Always 'profile-picture' for Profile Picture records.
                              type: string
                              enum:
                                - profile-picture
                              examples:
                                - profile-picture
                            attributes:
                              description: An object containing the Profile Picture attributes.
                              type: object
                              properties:
                                profile_picture_id:
                                  description: The ID of the Profile Picture
                                  type: integer
                                  examples:
                                    - 22
                                  readOnly: true
                                path:
                                  description: The full path of the original image
                                  type: string
                                  format: uri
                                  examples:
                                    - https://api.infraspeak.com/tmp/bebc3cd8efca9c6af8618d1016c163d3.jpeg
                                path_icon:
                                  description: The full path of the image as a icon
                                  type: string
                                  format: uri
                                  examples:
                                    - https://api.infraspeak.com/tmp/b80bd97ee33af2da479e40e4b64a811.jpeg
                                date_uploaded:
                                  description: |
                                    The timestamp when the picture was uploaded
                                    This field uses the ISO 8601 format.
                                  type: string
                                  format: date-time
                                  examples:
                                    - '2025-01-31T12:34:48.000000Z'
                              required:
                                - profile_picture_id
                                - path
                                - path_icon
                                - date_uploaded
                          required:
                            - id
                            - type
                            - attributes
                        - title: Stock
                          description: Stock model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Stock
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - stock
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                stock_id:
                                  description: ID of the Stock
                                  type: integer
                                  examples:
                                    - 1
                                  readOnly: true
                                stock_movement_id:
                                  description: ID of the last Stock Movement of the Stock
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 1
                                  readOnly: true
                                action:
                                  description: Action performed for the stock
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                warehouse_id:
                                  description: ID of the warehouse associated with the stock
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                material_id:
                                  description: ID of the material associated with the stock
                                  type: integer
                                  readOnly: true
                                quantity:
                                  description: Quantity of the material present in the stock
                                  type: number
                                  readOnly: true
                                mean_price:
                                  description: Mean price of the material associated with the stock
                                  type:
                                    - number
                                    - 'null'
                                  readOnly: true
                                observation:
                                  description: Description or notes of the stock
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                date:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  examples:
                                    - '2020-08-28 17:12:00'
                                  readOnly: true
                                failure_id:
                                  description: ID of the failure associated with the stock
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                schedule_work_id:
                                  description: ID of the schedule work associated with this stock
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                mean_price_manually_updated:
                                  description: Mean price of the stock (if it was manually updated)
                                  type: boolean
                                  default: false
                                  readOnly: true
                                date_updated:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  examples:
                                    - '2020-08-28 17:12:00'
                                  readOnly: true
                                destination_id:
                                  description: >-
                                    ID of the destination warehouse of the stock. Only present if the stock action is
                                    "MOVED_FROM"
                                  type: integer
                                  readOnly: true
                                source_id:
                                  description: >-
                                    ID of the origin warehouse of the stock. Only present if the stock action is
                                    "MOVED_TO"
                                  type: integer
                                  readOnly: true
                          required:
                            - id
                            - type
                            - attributes
                        - title: Material
                          description: Material model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Material
                              type: string
                              examples:
                                - '1'
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - material
                              examples:
                                - material
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                material_id:
                                  description: ID of the material
                                  type: integer
                                  examples:
                                    - 1
                                  readOnly: true
                                parent_id:
                                  description: ID of the associated folder of the material
                                  type: integer
                                  examples:
                                    - 1
                                  readOnly: true
                                name:
                                  description: Name of the material
                                  type: string
                                  examples:
                                    - Chair
                                code:
                                  description: Code of the material
                                  type: string
                                  examples:
                                    - CH-00001
                                full_code:
                                  description: Full code of the material (folders prefix included)
                                  type: string
                                  examples:
                                    - FOLDER.CH-00001
                                  readOnly: true
                                observations:
                                  description: Material observations
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - This is a observation
                                is_real:
                                  description: Indicates if this is a real material or a parent folder of materials
                                  type: boolean
                                  examples:
                                    - true
                                units:
                                  description: Indicates which kind of unit should this material be measured with
                                  type: string
                                  examples:
                                    - un
                                mean_price:
                                  description: Mean price of the material
                                  examples:
                                    - 8
                                has_children:
                                  description: Indicates if this material is a parent of other materials
                                  type: boolean
                                  examples:
                                    - true
                                default_sell_price:
                                  description: The default sell price of the material
                                  type: number
                                  examples:
                                    - 10
                                default_sell_vat:
                                  description: The default sell VAT of the material
                                  type: number
                                  examples:
                                    - 23
                                is_from_network:
                                  description: Indicates if the material was shared via Infraspeak Network
                                  type: boolean
                                  examples:
                                    - false
                                purchase_consumption_type:
                                  description: Purchase consumption type of the material
                                  type: string
                                  enum:
                                    - INHERIT
                                    - AUTOMATIC
                                    - MANUAL
                                  examples:
                                    - INHERIT
                          required:
                            - id
                            - type
                            - attributes
                    uniqueItems: true
                required:
                  - data
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /elements/{elementId}:
    get:
      operationId: getElement
      tags:
        - Elements
      summary: Get Element (Asset)
      description: >
        Retrieves the details of a specific Element (often referred to as an Assets) identified by its ID. May redirect
        to a new location if the resource requested has been matched (single-player element with network-element) and
        requested resource is the network-element.


        This endpoint allows query parameters to be used with the
        [JQL](../../../../../../docs/api/../.markdown/1.introduction/4-parameters.md).
      parameters:
        - name: elementId
          in: path
          description: Element ID
          required: true
          schema:
            type: string
          examples:
            default:
              value: '12345'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: Element
                    description: Represents an Element (Asset) structure details
                    type: object
                    properties:
                      id:
                        description: The unique string identifier of the Element record.
                        type: string
                        readOnly: true
                        examples:
                          - '123'
                      type:
                        description: The resource type. Always 'element' for Element records.
                        type: string
                        enum:
                          - element
                        readOnly: true
                        examples:
                          - element
                      attributes:
                        description: An object containing the Element's attributes.
                        type: object
                        properties:
                          cost_center_id:
                            description: The ID of the Cost Center associated with this Element, if available.
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 758
                          type:
                            description: |
                              The specific type of the Element.
                              Allowing to identify if a Element is a equipment or local
                            type: string
                            enum:
                              - LOCAL
                              - EQUIPMENT
                            examples:
                              - EQUIPMENT
                          barcode:
                            description: The barcode value associated with the Element, if available.
                            type:
                              - string
                              - 'null'
                            examples:
                              - N123T
                          code:
                            description: The assigned code or identifier for the Element, often used for quick reference.
                            type:
                              - string
                              - 'null'
                            examples:
                              - 123A
                          created_at:
                            description: |
                              The timestamp when the Element record was created.
                              This field uses the ISO 8601 format.
                            type: string
                            format: date-time
                            readOnly: true
                            examples:
                              - '2019-06-22T17:26:27.000000Z'
                          date_deleted:
                            description: The timestamp when the Element was marked as deleted (soft delete). Null if not deleted.
                            type:
                              - string
                              - 'null'
                            format: date-time
                            readOnly: true
                            examples:
                              - null
                          element_id:
                            description: The unique numeric identifier for the Element record (matches the top-level 'id').
                            type: integer
                            readOnly: true
                            examples:
                              - 123
                          element_uuid:
                            description: The universally unique identifier (UUID) for the Element record.
                            type: string
                            format: uuid
                            readOnly: true
                            examples:
                              - f81d4fae-7dec-11d0-a765-00a0c91e6bf6
                          entity_id:
                            description: The ID of the parent Entity this Element belongs to.
                            type: integer
                            examples:
                              - 456
                          failures_count:
                            description: A counter indicating the number of open Failures (Work orders) for this element.
                            type: integer
                            readOnly: true
                            examples:
                              - 0
                          has_bar_code:
                            description: Flag indicating whether the Element has an associated barcode.
                            type: boolean
                            examples:
                              - false
                          has_nfc:
                            description: Flag indicating whether the Element is equipped with an NFC tag.
                            type: boolean
                            examples:
                              - true
                          has_pmp:
                            description: |
                              Flag indicating whether the element has PMP (Preventive Maintenance Plan)
                              * Only present when the query parameter `showHasPMP` is set to true
                            type: boolean
                            examples:
                              - false
                          is_direct_page_accessible:
                            description: Flag indicating whether the element is accessible from Direct pages.
                            type: boolean
                            examples:
                              - true
                          is_from_network:
                            description: >-
                              Flag indicating whether the element is part of the Network feature (if it has been
                              shared).
                            type: boolean
                            examples:
                              - false
                          last_modified:
                            description: |
                              The timestamp of the last recorded modification or action related to the Element.
                              This field uses the DATETIME format (YYYY-MM-DD HH:MM:SS).
                            type:
                              - string
                              - 'null'
                            readOnly: true
                            examples:
                              - '2024-07-25 12:57:33'
                          latitude:
                            description: The geographical latitude coordinate of the Element, if available.
                            type:
                              - number
                              - 'null'
                            format: float
                            examples:
                              - 41.1458
                          local_id:
                            description: The ID of the Local (Location) where this Element belongs.
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 445
                          longitude:
                            description: The geographical longitude coordinate of the Element, if available.
                            type:
                              - number
                              - 'null'
                            format: float
                            examples:
                              - 42.1458
                          maintenance_policy_id:
                            description: The ID of the Maintenance Policy associated with this Element, if available.
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 659
                          matched_element:
                            title: MatchedElement
                            description: |
                              The matched element associated with this element.
                            type:
                              - object
                              - 'null'
                            properties:
                              type:
                                description: The type of the matched element
                                type: string
                                enum:
                                  - LOCAL
                                  - EQUIPMENT
                                examples:
                                  - EQUIPMENT
                              code:
                                description: Code of the matched element
                                type: string
                                examples:
                                  - ASSET.1.CODE
                              id:
                                description: ID of the matched element
                                type: integer
                                examples:
                                  - 12
                              is_from_network:
                                description: Flag that indicates if the matched element is from network or not
                                type: boolean
                                examples:
                                  - false
                          metering:
                            description: >
                              Element measurements in array format

                              * Only available for the single-item element endpoint

                              * Only present when the query parameter `showMeteringData` is set to true, and if there
                              are any measurements. Otherwise, the field will not be sent
                            type: array
                            items:
                              type: object
                              properties:
                                type:
                                  description: The type of measurement
                                  type: string
                                  enum:
                                    - RANGE
                                    - TEXT
                                    - CUMULATIVE
                                    - CATALOG
                                    - AUDIT
                                  examples:
                                    - CATALOG
                                category_metering_id:
                                  description: The ID of the Category Metering associated with this measurement.
                                  type: integer
                                  examples:
                                    - 1
                                element_registry_id:
                                  description: The ID of the Element Registry associated with this measurement.
                                  type: integer
                                  examples:
                                    - 2
                                max_value:
                                  description: The maximum value of this measurement
                                  type:
                                    - number
                                    - 'null'
                                  examples:
                                    - 15
                                min_value:
                                  description: The minimum value of this measurement
                                  type:
                                    - number
                                    - 'null'
                                  examples:
                                    - 5
                                name:
                                  description: Name of this measurement.
                                  type: string
                                  examples:
                                    - Lorem
                                statistics:
                                  description: Current measurement statistics
                                  oneOf:
                                    - description: Standard statistic for most types of measurements
                                      type: object
                                      properties:
                                        max:
                                          description: The maximum value of this statistic
                                          type: string
                                          examples:
                                            - '235'
                                        min:
                                          description: The minimum value of this statistic
                                          type: string
                                          examples:
                                            - '2'
                                        avg:
                                          description: The average value of this statistic
                                          type: string
                                          examples:
                                            - '109.17'
                                        stddev_samp:
                                          description: >
                                            The sample standard deviation of the metering readings.

                                            Indicates the data point spread around the average.

                                            Lower values mean data is closer to the average; higher values indicate a
                                            wider spread.
                                          type: string
                                          examples:
                                            - '100.68'
                                    - description: Statistics for `CATALOG` measurements type
                                      type: object
                                      properties:
                                        last_value:
                                          description: The last value of this measurement was recorded
                                          type: string
                                          examples:
                                            - option1
                                        las_reading_time:
                                          description: The date of the last value of this measurement was recorded
                                          type: string
                                          examples:
                                            - '2021-11-24T15:25:25+00:00'
                                unit:
                                  description: Name of the type of measurement unit.
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - UN
                                values:
                                  type: array
                                  items: {}
                          nfc_code:
                            description: The element's NFC tag code, if available.
                            type:
                              - string
                              - 'null'
                            examples:
                              - A123B
                          observation:
                            description: Optional notes or observations recorded for the Element.
                            type:
                              - string
                              - 'null'
                            examples:
                              - Lorem ipsum dolor sit amet, consectetur adipiscing elit
                          updated_at:
                            description: |
                              The timestamp when the Element record was last updated.
                              This field uses the ISO 8601 format.
                            type: string
                            format: date-time
                            readOnly: true
                            examples:
                              - '2025-01-31T12:34:48.000000Z'
                        required:
                          - element_id
                          - type
                          - code
                          - entity_id
                          - observation
                          - has_nfc
                          - has_bar_code
                          - date_deleted
                          - failures_count
                          - nfc_code
                          - barcode
                          - last_modified
                          - local_id
                          - latitude
                          - longitude
                          - is_from_network
                          - element_uuid
                          - is_direct_page_accessible
                          - cost_center_id
                          - created_at
                          - updated_at
                      meta:
                        type: object
                        properties:
                          custom_fields:
                            type:
                              - object
                              - 'null'
                            additionalProperties:
                              oneOf:
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - SELECT
                                      examples:
                                        - SELECT
                                    value:
                                      description: The current values of the Custom Field in this resource
                                      type:
                                        - array
                                        - 'null'
                                      items:
                                        type: object
                                        properties:
                                          option_id:
                                            description: The ID of the selected option
                                            type: integer
                                            examples:
                                              - 123
                                          option_code:
                                            description: The code of the selected option
                                            type:
                                              - string
                                              - 'null'
                                            examples:
                                              - OP01
                                          value:
                                            description: The value of the selected option
                                            type: string
                                            examples:
                                              - My Option 1
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: The type settings for the Custom Field
                                          type: object
                                          properties:
                                            allow_multiple_selection:
                                              description: Indicates if the Custom Field supports selecting multiple values
                                              type: boolean
                                              examples:
                                                - true
                                            managed_by_integrations:
                                              description: Indicates if the Custom Field options are only managed by integrations
                                              type: boolean
                                              examples:
                                                - true
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - TEXT
                                      examples:
                                        - TEXT
                                    value:
                                      description: The current value of the Custom Field in this resource
                                      type:
                                        - string
                                        - 'null'
                                      examples:
                                        - abc
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: >-
                                            The type settings for the Custom Field (Empty for Custom Fields of type
                                            TEXT)
                                          type: object
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - BOOLEAN
                                      examples:
                                        - BOOLEAN
                                    value:
                                      description: The current value of the Custom Field in this resource
                                      type:
                                        - boolean
                                        - 'null'
                                      examples:
                                        - true
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: >-
                                            The type settings for the Custom Field (There are none for the Custom Field
                                            Boolean type)
                                          type: object
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - RELATIONSHIP
                                      examples:
                                        - RELATIONSHIP
                                    value:
                                      description: The current values of the Custom Field in this resource
                                      type:
                                        - array
                                        - 'null'
                                      items:
                                        type: object
                                        properties:
                                          related_to_type:
                                            description: The type of object that is selected as the Custom Field Values
                                            type: string
                                            enum:
                                              - CLIENT
                                              - CONTACT
                                            examples:
                                              - CLIENT
                                          related_to_id:
                                            description: The ID of object that is selected as the Custom Field Value
                                            type: integer
                                            examples:
                                              - 123
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: The type settings for the Custom Field
                                          type: object
                                          properties:
                                            allow_multiple_selection:
                                              description: Indicates if the Custom Field allows multiple selection
                                              type: boolean
                                              examples:
                                                - false
                                            relationship_object:
                                              description: The type of object that is selected as the Custom Field Values
                                              type: string
                                              enum:
                                                - CLIENT
                                                - CONTACT
                                              examples:
                                                - CLIENT
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - DATETIME
                                      examples:
                                        - DATETIME
                                    value:
                                      description: The current value of the Custom Field in this resource
                                      type:
                                        - string
                                        - 'null'
                                      format: date-time
                                      examples:
                                        - '2025-12-12 12:39:00'
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: The type settings for the Custom Field
                                          type: object
                                          properties:
                                            allow_past_dates:
                                              description: Indicates if this Custom Field support past dates
                                              type: boolean
                                              examples:
                                                - false
                                            allow_future_dates:
                                              description: Indicates if this Custom Field support future dates
                                              type: boolean
                                              examples:
                                                - true
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - NUMBER
                                      examples:
                                        - NUMBER
                                    value:
                                      description: The current value of the Custom Field in this resource
                                      type:
                                        - integer
                                        - 'null'
                                      examples:
                                        - 12
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: The type settings for the Custom Field
                                          type: object
                                          properties:
                                            min:
                                              description: Indicates the minimum value for the Custom Field
                                              type:
                                                - integer
                                                - 'null'
                                              examples:
                                                - 1
                                            max:
                                              description: Indicates the maximum value for the Custom Field
                                              type:
                                                - integer
                                                - 'null'
                                              examples:
                                                - 3
                              discriminator:
                                propertyName: field_type
                    required:
                      - id
                      - type
                      - attributes
                  included:
                    description: >
                      List of related resources to be included in the response.

                      * The related resources will be present according to the parameters that have been sent via the
                      `expanded` query parameter
                    type: array
                    items:
                      anyOf:
                        - title: AndroidElementAuditStats
                          description: >
                            Audit Stats of an element

                            Details maximum potential, current recorded, and current achievable maximum values from
                            audit measurements.

                            * Schema used only for the Android application
                          type: object
                          properties:
                            id:
                              description: The unique string identifier of the Audit Stats record.
                              type:
                                - string
                                - 'null'
                              examples:
                                - '123'
                            type:
                              description: The resource type. Always 'audit_stats' for Audit Stats records.
                              type: string
                              enum:
                                - audit_stats
                              examples:
                                - audit_stats
                            attributes:
                              description: An object containing the Audit Stats attributes.
                              type: object
                              properties:
                                max_value:
                                  description: |
                                    The maximum potential value or weight defined for this measurement category
                                    associated with the asset. It represents the sum of the maximum weights
                                    of all related catalog entries for this category.
                                  type: number
                                  examples:
                                    - 100
                                current_value:
                                  description: |
                                    The current value or weight recorded for this measurement. If no value
                                    has been recorded, this will be 0.
                                  type: number
                                  examples:
                                    - 75
                                current_max_value:
                                  description: |
                                    The current maximum potential value achievable based on the recorded
                                    measurements. It sums the maximum weights for the catalog entries that
                                    currently have a recorded value.
                                  type: number
                                  examples:
                                    - 100
                              required:
                                - max_value
                                - current_value
                                - current_max_value
                          required:
                            - id
                            - type
                            - attributes
                        - title: ElementAuditStats
                          description: >
                            Audit Stats of an element

                            Details maximum potential, current recorded, and current achievable maximum values from
                            audit measurements.
                          type: object
                          properties:
                            id:
                              description: The unique string identifier of the Audit Stats record.
                              type:
                                - string
                                - 'null'
                              examples:
                                - '123'
                            type:
                              description: The resource type. Always 'audit_stats' for Audit Stats records.
                              type: string
                              enum:
                                - audit_stats
                              examples:
                                - audit_stats
                            attributes:
                              description: An object containing the Audit Stats attributes.
                              type: object
                              properties:
                                category_id:
                                  description: The ID of the Category associated with this Audit Stats.
                                  type: integer
                                  examples:
                                    - 1
                                max_value:
                                  description: |
                                    The maximum potential value or weight defined for this measurement category
                                    associated with the asset. It represents the sum of the maximum weights
                                    of all related catalog entries for this category.
                                  type: number
                                  examples:
                                    - 100
                                current_value:
                                  description: |
                                    The current value or weight recorded for this measurement. If no value
                                    has been recorded, this will be 0.
                                  type: number
                                  examples:
                                    - 75
                                current_max_value:
                                  description: |
                                    The current maximum potential value achievable based on the recorded
                                    measurements. It sums the maximum weights for the catalog entries that
                                    currently have a recorded value.
                                  type: number
                                  examples:
                                    - 100
                                schedule_work_id:
                                  description: The ID of the Schedule Work associated with this Audit Stats.
                                  type: integer
                                  examples:
                                    - 2
                              required:
                                - max_value
                                - current_value
                                - current_max_value
                                - category_id
                                - schedule_work_id
                          required:
                            - id
                            - type
                            - attributes
                        - title: ElementCharacteristic
                          description: Element Characteristic structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Element Characteristic
                              type: string
                              readOnly: true
                              examples:
                                - '123'
                            type:
                              description: The resource type. Always 'element-characteristic' for ElementCharacteristic records.
                              type: string
                              enum:
                                - element-characteristic
                              readOnly: true
                              examples:
                                - element-characteristic
                            attributes:
                              type: object
                              properties:
                                element_characteristic_id:
                                  description: ID of the Element Characteristic
                                  type: integer
                                  examples:
                                    - 123
                                element_id:
                                  description: ID of the associated Element
                                  type: integer
                                  examples:
                                    - 327
                                characteristic_id:
                                  description: ID of the associated Characteristic
                                  type: integer
                                  examples:
                                    - 587
                                value:
                                  description: >-
                                    Value of the Element Characteristic. The type of this value depends on the
                                    characteristic_type (can be text or number or null)
                                  oneOf:
                                    - type: string
                                      examples:
                                        - Good
                                    - type: number
                                      examples:
                                        - 147.85
                                    - type: 'null'
                                material_id:
                                  description: ID of the associated Material
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 687
                                quantity:
                                  description: Quantity of the material
                                  type:
                                    - number
                                    - 'null'
                                  examples:
                                    - 893
                                characteristic_catalog_id:
                                  description: ID of the associated Characteristic Catalog
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 687
                                is_from_network:
                                  description: Whether the Element Characteristic is received from the network
                                  type: boolean
                                  examples:
                                    - false
                              required:
                                - element_characteristic_id
                                - element_id
                                - characteristic_id
                                - value
                                - material_id
                                - quantity
                                - characteristic_catalog_id
                                - is_from_network
                          required:
                            - id
                            - type
                            - attributes
                        - title: ElementEconomic
                          description: Element Economic model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Element Economic
                              type: string
                              examples:
                                - '123'
                              readOnly: true
                            type:
                              description: The resource type. Always 'element_economic' for ElementEconomic records.
                              type: string
                              enum:
                                - element_economic
                              examples:
                                - element_economic
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                element_economic_id:
                                  description: ID of the Element Economic
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 123
                                  readOnly: true
                                acquisition_cost:
                                  description: Acquisition cost of the Element
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - '25.9'
                                lifetime:
                                  description: Lifetime of the Element
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 3
                                supplier_name:
                                  description: Name of the Element Supplier
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - John Doe
                                acquisition_date:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - type:
                                        - string
                                        - 'null'
                                      examples:
                                        - '2020-08-28 17:12:00'
                                      readOnly: true
                                stoppage_cost:
                                  description: Stoppage cost of the Element
                                  type:
                                    - number
                                    - 'null'
                                  examples:
                                    - 75.9
                                residual_value:
                                  description: Residual value of the Element
                                  type:
                                    - number
                                    - 'null'
                                  examples:
                                    - 2
                                actual_value:
                                  description: Actual value of the Element
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - '75.85'
                                annual_depreciation:
                                  description: Annual depreciation of the Element
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - '54.3687'
                                deperciation_tax:
                                  description: |
                                    Depreciation tax of the Element
                                    * Yes, we have a typo here
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - '50.00'
                                month_life:
                                  description: Month life of the Element
                                  type:
                                    - number
                                    - 'null'
                                  examples:
                                    - 1
                                monthly_depreciation:
                                  description: Monthly depreciation of the Element
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - '0.9542'
                                total_depreciated:
                                  description: Total depreciation of the Element
                                  type:
                                    - string
                                    - 'null'
                                detailed_costs_not_scheduled:
                                  description: Array of detailed not scheduled costs. (Can be an empty array)
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      label:
                                        description: Label of the cost
                                        type: string
                                        examples:
                                          - 5-2025
                                      group_start_time:
                                        type:
                                          - string
                                          - 'null'
                                        format: date-time
                                        examples:
                                          - '2025-05-01 00:00:00+00'
                                        readOnly: true
                                      labor_cost:
                                        description: The labor cost
                                        type: string
                                        examples:
                                          - '0.00'
                                      cumulative_labor_cost:
                                        description: The cumulative labor cost
                                        type: string
                                        examples:
                                          - '0.00'
                                      material_cost:
                                        description: The material cost
                                        type: string
                                        examples:
                                          - '0.00'
                                      cumulative_material_cost:
                                        description: The cumulative material cost
                                        type: string
                                        examples:
                                          - '0.00'
                                      cumulative_total_cost:
                                        description: The cumulative total cost
                                        type: string
                                        examples:
                                          - '0.00'
                                detailed_costs_scheduled:
                                  description: Array of detailed scheduled costs. (Can be an empty array)
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      label:
                                        description: Label of the cost
                                        type: string
                                        examples:
                                          - 5-2025
                                      group_start_time:
                                        type:
                                          - string
                                          - 'null'
                                        format: date-time
                                        examples:
                                          - '2025-05-01 00:00:00+00'
                                        readOnly: true
                                      labor_cost:
                                        description: The labor cost
                                        type: string
                                        examples:
                                          - '0.00'
                                      cumulative_labor_cost:
                                        description: The cumulative labor cost
                                        type: string
                                        examples:
                                          - '0.00'
                                      material_cost:
                                        description: The material cost
                                        type: string
                                        examples:
                                          - '0.00'
                                      cumulative_material_cost:
                                        description: The cumulative material cost
                                        type: string
                                        examples:
                                          - '0.00'
                                      cumulative_total_cost:
                                        description: The cumulative total cost
                                        type: string
                                        examples:
                                          - '0.00'
                                detailed_costs_failure:
                                  description: Array of detailed failure costs. (Can be an empty array)
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      label:
                                        description: Label of the cost
                                        type: string
                                        examples:
                                          - 5-2025
                                      group_start_time:
                                        type:
                                          - string
                                          - 'null'
                                        format: date-time
                                        examples:
                                          - '2025-05-01 00:00:00+00'
                                        readOnly: true
                                      labor_cost:
                                        description: The labor cost
                                        type: string
                                        examples:
                                          - '0.00'
                                      cumulative_labor_cost:
                                        description: The cumulative labor cost
                                        type: string
                                        examples:
                                          - '0.00'
                                      material_cost:
                                        description: The material cost
                                        type: string
                                        examples:
                                          - '0.00'
                                      cumulative_material_cost:
                                        description: The cumulative material cost
                                        type: string
                                        examples:
                                          - '0.00'
                                      cumulative_total_cost:
                                        description: The cumulative total cost
                                        type: string
                                        examples:
                                          - '0.00'
                              required:
                                - element_economic_id
                                - acquisition_cost
                                - lifetime
                                - supplier_name
                                - acquisition_date
                                - stoppage_cost
                                - residual_value
                                - actual_value
                                - annual_depreciation
                                - deperciation_tax
                                - month_life
                                - monthly_depreciation
                                - total_depreciated
                          required:
                            - id
                            - type
                            - attributes
                        - title: ElementNetworkSharedMapping
                          description: Represents the mapping of an Element (Asset) through the Network
                          type: object
                          properties:
                            id:
                              description: The unique string identifier of the Element Network Shared Mapping  record.
                              type:
                                - string
                                - 'null'
                              examples:
                                - '123'
                            type:
                              description: >-
                                The resource type. Always 'element_network_shared_mapping' for Element Network Shared
                                Mapping records.
                              type: string
                              enum:
                                - element_network_shared_mapping
                              examples:
                                - element_network_shared_mapping
                            attributes:
                              description: An object containing the Element Network Shared Mapping attributes.
                              type: object
                              properties:
                                element_id:
                                  description: The ID of the Element that was shared
                                  type: integer
                                  examples:
                                    - 22
                                  readOnly: true
                                entity_id:
                                  description: The ID of the Entity associated with the Element.
                                  type: integer
                                  examples:
                                    - 12
                                receiver_id:
                                  description: The ID of the receiver (Entity) to which the Element has been shared.
                                  type: integer
                                  examples:
                                    - 214
                                receiver_type:
                                  description: The type of receiver
                                  type: string
                                  enum:
                                    - CLIENT
                                    - SUPPLIER
                                  examples:
                                    - SUPPLIER
                                created_at:
                                  description: |
                                    The timestamp when the record was created.
                                    This field uses the ISO 8601 format.
                                  type: string
                                  format: date-time
                                  examples:
                                    - '2019-06-22T17:26:27.000000Z'
                                updated_at:
                                  description: |
                                    The timestamp when the record was last updated.
                                    This field uses the ISO 8601 format.
                                  type: string
                                  format: date-time
                                  examples:
                                    - '2025-01-31T12:34:48.000000Z'
                              required:
                                - element_id
                                - entity_id
                                - receiver_id
                                - receiver_type
                                - created_at
                                - updated_at
                          required:
                            - id
                            - type
                            - attributes
                        - title: ElementOtherCost
                          description: Element Other Cost model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Element Other Cost
                              type: string
                              examples:
                                - '123'
                              readOnly: true
                            type:
                              description: The resource type. Always 'element_other_cost' for Element Other Cost records.
                              type: string
                              enum:
                                - element_other_cost
                              examples:
                                - element_other_cost
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                element_other_cost_id:
                                  description: >-
                                    The unique numeric identifier for the Element Other Cost record (matches the
                                    top-level 'id').
                                  type: integer
                                  examples:
                                    - 123
                                  readOnly: true
                                element_id:
                                  description: ID of the associated Element
                                  type: integer
                                  examples:
                                    - 123
                                other_cost_id:
                                  description: ID of the associated Other Cost
                                  type: integer
                                  examples:
                                    - 123
                                entity_id:
                                  description: ID of the associated Entity
                                  type: integer
                                  examples:
                                    - 123
                                operator_id:
                                  description: ID of the associated Operator
                                  type: integer
                                  examples:
                                    - 123
                                numeric_value:
                                  description: Numeric value of the Element Other Cost
                                  type:
                                    - number
                                    - 'null'
                                  examples:
                                    - 1.2
                                start_time:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  examples:
                                    - '2020-08-28T17:12:00.000Z'
                                  readOnly: true
                                end_time:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  examples:
                                    - '2020-08-28T17:12:00.000Z'
                                  readOnly: true
                                description:
                                  description: A description about the Element Other Cost
                                  type:
                                    - string
                                    - 'null'
                                interval_value:
                                  description: The duration of the ElementOtherCost in the format (HH-MM-SS)
                                  type: string
                                  examples:
                                    - '00:15'
                                updated_date:
                                  type: string
                                  format: date-time
                                  examples:
                                    - '2020-08-28T17:12:00.000Z'
                                  readOnly: true
                                cost:
                                  description: The cost of the Element Other Cost
                                  type: number
                                  examples:
                                    - 1.2
                          required:
                            - id
                            - type
                            - attributes
                        - title: ElementRegistry
                          description: Represents an Element Registry (Asset Registry) structure details
                          type: object
                          properties:
                            id:
                              description: The unique string identifier of the Element Registry record.
                              type: string
                              readOnly: true
                              examples:
                                - '123'
                            type:
                              description: The resource type. Always 'element_registry' for Element Registry records.
                              type: string
                              enum:
                                - element_registry
                              readOnly: true
                              examples:
                                - element_registry
                            attributes:
                              description: An object containing the Element Registry's attributes.
                              type: object
                              properties:
                                element_registry_id:
                                  description: >-
                                    The unique numeric identifier for the Element Registry record (matches the top-level
                                    'id').
                                  type: integer
                                  examples:
                                    - 123
                                maintenance_procedure_id:
                                  description: >-
                                    The ID of the Maintenance Procedure associated with this Element Registry, if
                                    available.
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 345
                                operator_id:
                                  description: |
                                    The ID of the Operator associated with this Element Registry, if available.
                                    - Helps identify the operator who performed the action that generated the record
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 456
                                work_id:
                                  description: |
                                    The ID of the Work associated with this Element Registry, if available.
                                    - Works are also described in the application as `Planned Jobs`.
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 567
                                schedule_work_id:
                                  description: |
                                    The ID of the Scheduled Work associated with this Element Registry, if available.
                                    - Scheduled Works are also described in the application as `Planned jobs orders`.
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 678
                                status:
                                  description: Indicates the status of the Element Register
                                  type: string
                                  enum:
                                    - PENDING
                                    - CANCELED
                                    - ACTIVE
                                    - COMPLETED
                                  examples:
                                    - COMPLETED
                                element_id:
                                  description: The ID of the Element (Asset) associated with this Element Registry, if available.
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 987
                                start_time:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: |
                                        The timestamp for when the action was started
                                        - Not all actions have a **start_time**
                                        - An example of an action with **start_time** is `SCHEDULED_WORK`
                                      type:
                                        - string
                                        - 'null'
                                end_time:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: |
                                        The timestamp for when the action was finished
                                        - Not all actions have a **end_time**
                                        - An example of an action with **end_time** is `SCHEDULED_WORK`
                                      type:
                                        - string
                                        - 'null'
                                observation:
                                  description: Optional notes or observations recorded for the Element Registry.
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - Lorem ipsum dolor sit amet, consectetur adipiscing elit
                                entity_id:
                                  description: The ID of the parent Entity this Element belongs to.
                                  type: integer
                                  examples:
                                    - 456
                                action:
                                  description: >
                                    The performed action that generated the Element Registry

                                    - Actions can refer to the Element, or they can be about other resources linked to
                                    the Element in some way
                                  type: string
                                  enum:
                                    - ADD_COST
                                    - ADDED
                                    - ADDED_COST_CENTER
                                    - CHANGE_BAR_CODE
                                    - CHANGED_COST_CENTER
                                    - CHANGE_ELEMENT_STATUS
                                    - CHANGE_HOUSEKEEPER_OBSERVATION
                                    - CHANGE_HOUSEKEEPER_STATUS
                                    - CHANGE_IDENTIFIER
                                    - CHANGE_LOCAL
                                    - CHANGE_POLICY
                                    - CHANGE_WORK_ORDER_LOCAL
                                    - DELETE_COST
                                    - DELETED
                                    - DELETED_COST_CENTER
                                    - EDIT_COST
                                    - EDIT_ELEMENT_CHARACTERISTICS
                                    - FAILURE_TASK
                                    - MAINTENANCE_PROCEDURE
                                    - MANUAL_TASK
                                    - NEW_FAILURE
                                    - REMOVE_BAR_CODE
                                    - REMOVE_IDENTIFIER
                                    - SCHEDULED_WORK
                                    - SPECIAL_WORK
                                    - VISIT_BAR_CODE
                                    - VISIT_MANUAL
                                    - VISIT_NFC
                                  examples:
                                    - ADD_COST
                                failure_id:
                                  description: ID of the failure
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 789
                                intervention_id:
                                  description: ID of the intervention
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 875
                                duration:
                                  description: Duration of the action
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - 12 days 22:21:25
                                intervention_estimated_time:
                                  description: >-
                                    Estimate time, in format H:m:s, configured at Intervention level on the moment the
                                    Scheduled Work was completed
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - '01:21:25'
                                maintenance_procedure_estimated_time:
                                  description: >-
                                    Estimated time, in format H:m:s, configured at Task level on the moment the
                                    Scheduled Work was completed
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - '00:41:05'
                                from_local_id:
                                  description: ID of the Local where the action begins
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 756
                                to_local_id:
                                  description: ID of the Local where the action ends
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 755
                                to_maintenance_policy_id:
                                  description: ID of the Maintenance Policy where the action begins
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 742
                                from_maintenance_policy_id:
                                  description: ID of the Maintenance Policy where the action ends
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 364
                                quantity:
                                  description: Quantity used in the action
                                  type:
                                    - number
                                    - 'null'
                                  examples:
                                    - null
                                visit_type:
                                  description: Type of the visit
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - null
                                status_after:
                                  description: Status after the action
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - '1'
                                element_other_cost_id:
                                  description: ID of the element other cost
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 687
                                characteristics_updates:
                                  description: The characteristics updated during the action
                                  type:
                                    - array
                                    - 'null'
                                  items:
                                    type: object
                                    properties:
                                      label:
                                        description: The label of the Characteristic
                                        type: string
                                        examples:
                                          - A05. Weight
                                      newValue:
                                        description: The value after update. Has a mixed type
                                        type: string
                                        examples:
                                          - 2 Kg
                                      oldValue:
                                        description: The value before update. Has a mixed type
                                        type:
                                          - string
                                          - 'null'
                                        examples:
                                          - 6 Kg
                                      characteristicId:
                                        description: The ID of the Characteristic
                                        type: integer
                                        examples:
                                          - 1247
                                element_registry_uuid:
                                  description: The universally unique identifier (UUID) for the Element Registry record.
                                  type: string
                                  format: uuid
                                  readOnly: true
                                  examples:
                                    - f81d4fae-7dec-11d0-a765-00a0c91e6bf6
                                snapshot:
                                  description: >-
                                    A snapshot object containing all the valuable properties affected by the action in
                                    the Assets Registry.
                                  type:
                                    - object
                                    - 'null'
                                  examples:
                                    - {}
                                created_at:
                                  description: |
                                    The timestamp when the Element Registry record was created.
                                    This field uses the ISO 8601 format.
                                  type: string
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2019-06-22T17:26:27.000000Z'
                                updated_at:
                                  description: |
                                    The timestamp when the Element Registry record was last updated.
                                    This field uses the ISO 8601 format.
                                  type: string
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2025-01-31T12:34:48.000000Z'
                              required:
                                - element_registry_id
                                - maintenance_procedure_id
                                - operator_id
                                - work_id
                                - schedule_work_id
                                - status
                                - element_id
                                - start_time
                                - end_time
                                - observation
                                - entity_id
                                - action
                                - failure_id
                                - intervention_id
                                - duration
                                - from_local_id
                                - to_local_id
                                - to_maintenance_policy_id
                                - from_maintenance_policy_id
                                - quantity
                                - visit_type
                                - status_after
                                - element_other_cost_id
                                - characteristics_updates
                                - element_registry_uuid
                                - snapshot
                                - created_at
                                - updated_at
                          required:
                            - id
                            - type
                            - attributes
                        - title: FailureElementNetworkStatus
                          description: Represents the status of an Element (Asset) Failure through the Network
                          type: object
                          properties:
                            id:
                              description: The unique string identifier of the Failure Element Network Status   record.
                              type:
                                - string
                                - 'null'
                              examples:
                                - '123'
                            type:
                              description: >-
                                The resource type. Always 'failure_element_network_status' for Failure Element Network
                                Status records.
                              type: string
                              enum:
                                - failure_element_network_status
                              examples:
                                - failure_element_network_status
                            attributes:
                              description: An object containing the Failure Element Network Status  attributes.
                              type: object
                              properties:
                                element_id:
                                  description: The ID of the Element associated.
                                  type: integer
                                  examples:
                                    - 22
                                  readOnly: true
                                type:
                                  description: The type that identifies the side to which this mapping belongs
                                  type: string
                                  enum:
                                    - SENDER
                                    - RECEIVER
                                  examples:
                                    - SENDER
                                entity_id:
                                  description: The ID of the Entity associated with the Element.
                                  type: integer
                                  examples:
                                    - 12
                                failure_id:
                                  description: The ID of the Failure associated with the Element.
                                  type: integer
                                  examples:
                                    - 15
                                network_element_uuid:
                                  description: The UUID that identifies the Element throughout the Network
                                  type: string
                                  format: uuid
                                  examples:
                                    - e632afe8-a1bf-4702-b5bd-sb51a77dss3
                                network_failure_uuid:
                                  description: The UUID that identifies the Failure throughout the Network
                                  type: string
                                  format: uuid
                                  examples:
                                    - e632afe8-a1bf-4702-b5bd-b1163861ba51
                              required:
                                - entity_id
                                - failure_id
                                - element_id
                          required:
                            - id
                            - type
                            - attributes
                        - title: ElementHealthScoreInfo
                          description: Element Health Score Info model structure details
                          type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - element_health_score_info
                              examples:
                                - element_health_score_info
                            id:
                              type: string
                              example: '1'
                            attributes:
                              type: object
                              properties:
                                element_health_score_info:
                                  type: integer
                                  example: 1
                                health_score_flag:
                                  type: integer
                                  example: 1
                                health_score:
                                  type: number
                                  format: float
                                  example: 0.85
                                last_updated_at:
                                  type: string
                                  format: date-time
                                  examples:
                                    - '2026-02-01T00:00:00+00:00'
                        - title: Category
                          description: Category model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Category
                              type: string
                              examples:
                                - '123'
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - category
                              examples:
                                - category
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                category_id:
                                  description: ID of the Category
                                  type: integer
                                  examples:
                                    - 123
                                  readOnly: true
                                type:
                                  description: >-
                                    The Category type. A "TYPE_OF_EQUIPMENT" Category is directly related to equipments
                                    (e.g. a fridge) and a Category "SOFT_MAINTENANCE" is related to Locations (E.g.
                                    hotel rooms).
                                  type: string
                                  enum:
                                    - SOFT_MAINTENANCE
                                    - TYPE_OF_EQUIPMENT
                                  examples:
                                    - SOFT_MAINTENANCE
                                all_technical_skills:
                                  description: Indicates if this category is associated to all technical skills.
                                  type:
                                    - boolean
                                    - 'null'
                                  examples:
                                    - true
                                code:
                                  description: Code of the Category.
                                  type: string
                                  examples:
                                    - VENT
                                entity_id:
                                  description: Entity ID of the Category.
                                  type: integer
                                  examples:
                                    - 123
                                full_code:
                                  description: Codes of the category's parents concatenated by dot with category code.
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - XYZ.VENT
                                  readOnly: true
                                has_children:
                                  description: Whether the category has subitems or not.
                                  type: boolean
                                  examples:
                                    - true
                                  readOnly: true
                                is_real:
                                  description: Whether the category is a folder (false) or "final" category (true).
                                  type:
                                    - boolean
                                    - 'null'
                                  examples:
                                    - true
                                name:
                                  description: Name of the Category.
                                  type: string
                                  examples:
                                    - Ventilation
                                parent_id:
                                  description: ID of the category parent.
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 123
                            relationships:
                              description: Available relationships of the Category.
                              type: object
                              properties:
                                categoryMeterings:
                                  description: Category Meterings associated to the category.
                                  type: object
                                characteristics:
                                  description: Characteristics associated to the category.
                                  type: object
                                entity:
                                  description: Entity associated to the category.
                                  type: object
                                files:
                                  description: Files associated to the category.
                                  type: object
                                maintenanceProcedures:
                                  description: Maintenance Procedures associated to the category.
                                  type: object
                                maintenancePolicies:
                                  description: Maintenance Policies associated to the category.
                                  type: object
                                problems:
                                  description: Problems associated to the category.
                                  type: object
                                technicalSkills:
                                  description: Technical Skills associated to the category.
                                  type: object
                          required:
                            - id
                            - type
                            - attributes
                        - title: MeteringRegistry
                          description: MeteringRegistry model structure details
                          type: object
                          properties:
                            id:
                              description: ID of MeteringRegistry
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - metering-registry
                            attributes:
                              type: object
                              properties:
                                metering_registry_id:
                                  description: ID of MeteringRegistry
                                  type: integer
                                element_id:
                                  description: ID of Element
                                  type: integer
                                operator_id:
                                  description: ID of Operator
                                  type: integer
                                category_metering_id:
                                  description: ID of Category Metering
                                  type: integer
                                category_metering_catalog_id:
                                  description: ID of Category Metering Catalog
                                  type: integer
                                value:
                                  description: Value of the Metering Registry
                                  type: string
                                weight:
                                  description: Value of the Metering Registry
                                  type:
                                    - integer
                                    - 'null'
                                observation:
                                  description: Observation of the Metering Registry
                                  type: string
                                updated_by:
                                  description: User that updated the Metering Registry
                                  type: string
                                date_created:
                                  description: Date of creation of Metering Registry
                                  type: string
                                automated:
                                  type: boolean
                                last_metering_date:
                                  description: Date of last metering
                                  type: string
                                last_metering_value:
                                  description: Value of last metering
                                  type: string
                                measured_at:
                                  description: Date of measurement
                                  type: string
                                uuid:
                                  description: Uuid of the Metering Registry
                                  type: string
                        - title: MaintenancePolicy
                          description: MaintenancePolicy model structure details
                          type: object
                          properties:
                            id:
                              description: ID of MaintenancePolicy
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - maintenance-policy
                            attributes:
                              type: object
                              properties:
                                maintenance_policy_id:
                                  description: ID of MaintenancePolicy
                                  type: integer
                                name:
                                  description: Maintenance Policy Name
                                  type: string
                                has_cost:
                                  description: Maintenance Policy has cost
                                  type: boolean
                                category_id:
                                  description: ID of Category
                                  type: integer
                        - title: Clients
                          description: Client model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Client
                              type: string
                              examples:
                                - '123'
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - client
                              examples:
                                - client
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                client_id:
                                  description: ID of the Client
                                  type: integer
                                  examples:
                                    - 123
                                client_uuid:
                                  description: UUID of the Client
                                  type: string
                                  format: uuid
                                  examples:
                                    - e632afe8-a1bf-4702-b5bd-b1163861ba51
                                name:
                                  description: Client Name
                                  type: string
                                  examples:
                                    - John Doe
                                code:
                                  description: Client Code
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - JD
                                nif:
                                  description: NIF/ VAT Number of the Client
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - '1234566789'
                                postal_code:
                                  description: Postal Code of the Client
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - 1234-567
                                city:
                                  description: City of the Client
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - Lisbon
                                observations:
                                  description: Additional information
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - abc
                                address:
                                  description: Address of the Client
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - abc
                                country:
                                  description: Country of the Client
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - PT
                                created_at:
                                  description: The datetime of the creation of the Client
                                  type: string
                                  format: date-time
                                  examples:
                                    - '2020-12-03T12:45:00'
                                  readOnly: true
                                updated_at:
                                  description: The datetime of the last update of the Client
                                  type: string
                                  format: date-time
                                  examples:
                                    - '2020-12-03T12:45:00'
                                  readOnly: true
                                has_handshake:
                                  description: Indicates if this Client is "connected" to work on Infraspeak Network.
                                  type: boolean
                                  examples:
                                    - true
                                my_company:
                                  description: Indicates whether it is the entity's default client
                                  type: boolean
                                  examples:
                                    - true
                            relationships:
                              description: The relationships of the Client (Only present when expanded in the request)
                              type: object
                              properties:
                                buildings:
                                  description: The Buildings associated to the Client
                                  type: object
                                contacts:
                                  description: The Contacts associated to the Client
                                  type: object
                                files:
                                  description: The Files associated to the Client
                                  type: object
                                profilePicture:
                                  description: The profile picture of the the Client
                                  type: object
                                operators:
                                  description: The Operators associated to the Client
                                  type: object
                                handshake:
                                  description: The Handshake associated to the Client
                                  type: object
                          required:
                            - id
                            - type
                            - attributes
                        - title: Cost Center
                          description: >
                            Cost Center resource structure details.


                            Cost Centers in Infraspeak can be associated to Lines in Sales and Buy Orders, Failures
                            (Work Orders) or Scheduled Works (Planned Job Orders).
                          type: object
                          properties:
                            id:
                              description: Cost Center ID
                              type: string
                              readOnly: true
                            type:
                              description: Resource type
                              type: string
                              enum:
                                - cost_center
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                name:
                                  description: Name for the Cost Center.
                                  type: string
                                  examples:
                                    - AVAC Corretiva
                                code:
                                  description: Code for the Cost Center
                                  type: string
                                  examples:
                                    - C.AVAC
                                responsible_name:
                                  description: Name for the person responsible for the Cost Center
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - Luis
                                responsible_email:
                                  description: Email for the person responsible for the Cost Center
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - luis@example.com
                                responsible_phone:
                                  description: Phone Number for the person responsible for the Cost Center
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - '+351912345678'
                                responsible_cellphone:
                                  description: Cellphone Number for the person responsible for the Cost Center
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - '+351912345678'
                                observation:
                                  description: User defined Observations for the Cost Center
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - An observation regarding my cost center.
                        - title: Failure
                          description: Failure model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Failure
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - failure
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                failure_id:
                                  description: ID of the Failure
                                  type: integer
                                  readOnly: true
                                  examples:
                                    - 1
                                uuid:
                                  description: Universally Unique Identifier for the Failure
                                  type: string
                                  format: uuid
                                  readOnly: true
                                problem_id:
                                  description: ID of the associated problem
                                  type: integer
                                status:
                                  type: string
                                  enum:
                                    - WAITING_APPROVAL
                                    - WAITING_RESOLUTION
                                    - IN_RESOLUTION
                                    - PAUSED
                                    - COMPLETED
                                    - ARCHIVED
                                  readOnly: true
                                start_date:
                                  type: string
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T08:48:00.000Z'
                                completed_date:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T17:12:00.000Z'
                                approved_date:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T09:30:00.000Z'
                                paused_date:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T13:05:00.000Z'
                                description:
                                  type: string
                                  examples:
                                    - Needs replacement
                                last_status_description:
                                  type: string
                                  examples:
                                    - Completed
                                observations:
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - Needs a new part
                                code:
                                  type: string
                                  examples:
                                    - WO2022
                                fts_vector:
                                  description: Denormalized data of a Failure
                                  type: string
                                priority:
                                  description: Failure priority number being 1 the lowest priority and 4 the highest priority.
                                  type: integer
                                  enum:
                                    - 1
                                    - 2
                                    - 3
                                    - 4
                                client_id:
                                  description: ID of the associated client defined according to the respective `local_id`.
                                  type: integer
                                  readOnly: true
                                entity_id:
                                  description: ID of the Entity of the Failure
                                  type: integer
                                  readOnly: true
                                metering_registry_id:
                                  description: ID of a possible associated metering registry
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                local_id:
                                  description: ID of the location associated to the Failure
                                  type: integer
                                paused_reason_id:
                                  description: ID of the paused reason associated to the Failure
                                  type: integer
                                external_id:
                                  description: External ID to be associated to the Failure
                                  type:
                                    - string
                                    - 'null'
                                report_name:
                                  description: Name of who reported the Failure
                                  type: string
                                solved:
                                  description: Indicates whether the Failure was closed successfully or not
                                  type: boolean
                                  readOnly: true
                                  default: false
                                confirmed:
                                  description: Indicates whether the Failure is confirmed or not
                                  type: boolean
                                  readOnly: true
                                  default: false
                                started:
                                  description: Indicates whether the Failure is started or not
                                  type: boolean
                                  readOnly: true
                                  default: false
                                paused:
                                  description: Indicates whether the Failure is paused or not
                                  type: boolean
                                  readOnly: true
                                  default: false
                                completed:
                                  description: Indicates whether the Failure is completed or not
                                  type: boolean
                                  readOnly: true
                                  default: false
                                archived:
                                  description: Indicates whether the Failure is archived or not
                                  type: boolean
                                  readOnly: true
                                  default: false
                                approved:
                                  description: Indicates whether the Failure is approved or not
                                  type: boolean
                                  readOnly: true
                                  default: false
                                next_schedule:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-29T10:30:00.000Z'
                                message_count:
                                  type: integer
                                  minimum: 0
                                  default: 0
                                  examples:
                                    - 3
                                time_statistics:
                                  type: object
                                  properties:
                                    approved_date:
                                      type:
                                        - string
                                        - 'null'
                                      format: date-time
                                      readOnly: true
                                      examples:
                                        - '2020-08-28T09:30:00.000Z'
                                    last_completed_date:
                                      type:
                                        - string
                                        - 'null'
                                      format: date-time
                                      readOnly: true
                                      examples:
                                        - '2020-08-28T17:12:00.000Z'
                                    last_paused_date:
                                      type:
                                        - string
                                        - 'null'
                                      format: date-time
                                      readOnly: true
                                      examples:
                                        - '2020-08-28T13:05:00.000Z'
                                    started_date:
                                      type:
                                        - string
                                        - 'null'
                                      format: date-time
                                      readOnly: true
                                      examples:
                                        - '2020-08-28T09:45:00.000Z'
                                    time_to_approve:
                                      description: Duration it took to approve the Failure since reported in `ISO8601` format.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - P0Y0M0DT0H42M0S
                                    time_to_complete:
                                      description: Duration it took to complete the Failure since reported in `ISO8601` format.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - P0Y0M0DT8H24M0S
                                    time_to_complete_after_started:
                                      description: >-
                                        Duration it took to complete the Failure since the resolution started in
                                        `ISO8601` format.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - P0Y0M0DT7H27M0S
                                    time_to_start:
                                      description: >-
                                        Duration it took to start the Failure's resolution since reported in `ISO8601`
                                        format.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - P0Y0M0DT0H57M0S
                                    time_to_start_after_approved:
                                      description: >-
                                        Duration it took to start the Failure's resolution since approved in `ISO8601`
                                        format.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - P0Y0M0DT0H15M0S
                                    real_duration:
                                      description: Real duration of the Failure's resolution time in `ISO8601` format.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - P0Y0M0DT7H27M0S
                                supplier_id:
                                  description: ID of the supplier associated to the Failure
                                  type: integer
                                signature_status:
                                  description: Indicates whether the Failure is signed or not
                                  type: string
                                  enum:
                                    - SIGNED
                                    - NOT_SIGNED
                                  default: NOT_SIGNED
                                last_status_change_date:
                                  type: string
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T09:30:00.000Z'
                                approved_by_id:
                                  description: ID of the operator who approved the Failure.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                completed_by_id:
                                  description: ID of the operator who completed the Failure.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                started_by_id:
                                  description: ID of the operator who started the Failure's resolution.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                paused_by_id:
                                  description: ID of the operator who paused the Failure's resolution.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                approved_by:
                                  description: Name of the operator who approved the Failure.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                completed_by:
                                  description: Name of the operator who completed the Failure.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                started_by:
                                  description: Name of the operator who started the Failure's resolution.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                paused_by:
                                  description: Name of the operator who paused the Failure's resolution.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                reported_by:
                                  description: Name of the operator who reported the Failure.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                manpower_duration:
                                  description: Duration of the Failure's manpower time in `ISO8601` format.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                  examples:
                                    - P0Y0M0DT7H27M0S
                                cost_center_id:
                                  description: ID of the cost center associated to the Failure
                                  type:
                                    - integer
                                    - 'null'
                                network_failure_id:
                                  description: ID of the Network Failure
                                  type: integer
                                  readOnly: true
                                  examples:
                                    - 1
                                created_at:
                                  type: string
                                  format: date-time
                                  readOnly: true
                                updated_at:
                                  type: string
                                  format: date-time
                                  readOnly: true
                                date_deleted:
                                  type: string
                                  format: date-time
                                  readOnly: true
                            relationships:
                              type: object
                              properties:
                                approvedBy:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                completedBy:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                createdBy:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                files:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - file
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                location:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - location
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                operator:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                          required:
                            - id
                            - type
                            - attributes
                        - title: Geolocations
                          description: Geolocation model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Geolocation
                              type: string
                              examples:
                                - '1'
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - geolocation
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                related_to_id:
                                  description: Id of Related Object
                                  type: integer
                                  examples:
                                    - 1
                                related_to_type:
                                  description: Type related to
                                  type: string
                                  enum:
                                    - ELEMENT
                                    - LOCAL
                                    - OPERATOR
                                  examples:
                                    - OPERATOR
                                latitude:
                                  description: latitude of the geolocation
                                  type: string
                                  examples:
                                    - '0.0000000'
                                longitude:
                                  description: longitude of the geolocation
                                  type: string
                                  examples:
                                    - '0.0000000'
                                accuracy:
                                  description: accuracy of the geolocation
                                  type: string
                                  examples:
                                    - '10'
                                altitude:
                                  description: altitude of the geolocation
                                  type: string
                                  examples:
                                    - '10'
                                provider:
                                  description: provider of the geolocation
                                  type: string
                                  examples:
                                    - MANUAL
                                states:
                                  description: states of the geolocation
                                  type: array
                                  items:
                                    type: string
                                  examples:
                                    - - WORKING
                                      - FAILURE
                                      - SCHEDULED_WORK
                                thumb:
                                  description: thumbnaill for the map
                                  type: string
                                  examples:
                                    - https://...
                                active:
                                  description: active state of the geolocation
                                  type: boolean
                                  examples:
                                    - true
                                created_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: Date when the Geolocation was created
                                      readOnly: true
                                updated_at:
                                  allOf:
                                    - allOf:
                                        - type:
                                            - string
                                            - 'null'
                                          pattern: >-
                                            ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                            ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                          examples:
                                            - '2021-07-21 18:38:00'
                                        - description: Date when the Geolocation was created
                                          readOnly: true
                                    - description: Date when the Geolocation was last updated
                                label:
                                  description: If related_to_type is 'OPERATOR' then we send his full name as the label
                                  type: string
                                  examples:
                                    - Gabriel Monteiro
                        - title: HousekeeperAssetStatus
                          description: HousekeeperAssetStatus model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the HousekeeperAssetStatus
                              type: string
                              examples:
                                - '1'
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - housekeeper_asset_status
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                status_id:
                                  description: Status Id
                                  type: integer
                                  examples:
                                    - 1
                                element_id:
                                  description: Element Id
                                  type: integer
                                  examples:
                                    - 2
                                observation:
                                  description: Observation
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - Some Observation
                                external_observation:
                                  description: External observation from a PMS Integration
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - Some Observation
                                work_id:
                                  description: ID of the related Work
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 2
                                max_target_status_date:
                                  description: Datetime of the max target status
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  examples:
                                    - '2021-07-20T18:38:00.000Z'
                                assignees:
                                  description: List of the assigned Operators
                                  type:
                                    - array
                                    - 'null'
                                  items:
                                    type: object
                                check_in:
                                  description: Check in
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  examples:
                                    - '2021-07-20T18:38:00.000Z'
                                check_out:
                                  description: Check out
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  examples:
                                    - '2021-07-21T18:38:00.000Z'
                        - title: HousekeeperStatus
                          description: HousekeeperStatus model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the HousekeeperStatus
                              type: string
                              examples:
                                - '1'
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - housekeeper_status
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                status_code:
                                  description: Status code
                                  type: string
                                  examples:
                                    - Status code
                                order:
                                  description: Status order
                                  type: integer
                                  examples:
                                    - 0
                                default:
                                  description: Status order
                                  type: boolean
                                  examples:
                                    - true
                        - title: Location
                          description: Location model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Location
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - location
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                entity_id:
                                  type: integer
                                name:
                                  description: Location name
                                  type: string
                                full_name:
                                  description: Names of the location's parents concatenated by hyphen with location name.
                                  type: string
                                  readOnly: true
                                code:
                                  description: Location code.
                                  type: string
                                full_code:
                                  description: Codes of the location's parents concatenated by dot with location code.
                                  type: string
                                  readOnly: true
                                original_full_code:
                                  description: Location original full code.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                observation:
                                  description: Additional information
                                  type:
                                    - string
                                    - 'null'
                                date_updated:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - '2020-12-03 12:45:00'
                                parent_id:
                                  description: ID of the location parent.
                                  type: integer
                                root_parent_id:
                                  description: ID of the location root parent (of `type` equals to `building`).
                                  type: integer
                                  readOnly: true
                                area:
                                  description: Location area
                                  type:
                                    - number
                                    - 'null'
                                glass_area:
                                  description: Location glass area
                                  type:
                                    - number
                                    - 'null'
                                volume:
                                  description: Location volume
                                  type:
                                    - number
                                    - 'null'
                                orientation:
                                  description: Solar orientation (North, South, West, East)
                                  type:
                                    - string
                                    - 'null'
                                is_from_network:
                                  description: If Location is from network
                                  type: boolean
                                  readOnly: true
                                local_uuid:
                                  description: Location UUID
                                  type: string
                                  format: uuid
                                  readOnly: true
                                assets_count:
                                  description: >-
                                    Cumulative count of assets (equipment) in this location and all its descendants.
                                    Only present when `with_assets_count=true` query parameter is provided.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                associations:
                                  description: >
                                    List of ways the operator is associated with this building. Possible values are
                                    `DIRECT` (via a direct local-operator assignment), `TEAM` (via a team the operator
                                    belongs to), and `CLIENT` (via a client the operator is assigned to).
                                  type: array
                                  items:
                                    type: string
                                    enum:
                                      - DIRECT
                                      - TEAM
                                      - CLIENT
                              required:
                                - name
                                - full_name
                                - code
                                - full_code
                                - observation
                                - date_updated
                            relationships:
                              type: object
                              properties:
                                building:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - building
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                files:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - file
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                operators:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - operator
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                localOrientation:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - localOrientation
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                          required:
                            - id
                            - type
                            - attributes
                        - title: Location type
                          description: Location type model structure details
                          type: object
                          properties:
                            id:
                              description: The ID of the Location Type
                              type: string
                              examples:
                                - '123'
                              readOnly: true
                            type:
                              type: string
                              enum:
                                - location-type
                              examples:
                                - location-type
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                local_type_id:
                                  description: The ID of the Location Type
                                  type: integer
                                  examples:
                                    - 123
                                  readOnly: true
                                name:
                                  description: The name/description of the Location Type
                                  type: string
                                  examples:
                                    - Office
                                usage_type:
                                  description: >-
                                    This is a deprecated field that is no longer used, but it's kept in the response for
                                    backwards compatibility.
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - null
                                usage_number:
                                  description: >-
                                    This is a deprecated field that is no longer used, but it's kept in the response for
                                    backwards compatibility.
                                  type: integer
                                  examples:
                                    - 0
                                entity_id:
                                  description: The ID of the Entity where the Location Type belongs
                                  type: integer
                                  examples:
                                    - 123
                                  readOnly: true
                                general:
                                  description: >-
                                    Indicates if the Location Type is the General Location Type. Every Entity in
                                    Infraspeak contains a General Location Type that cannot be deleted, and all
                                    Locations that don't fit in any other Location Type fall into the General Location
                                    Type.
                                  type: boolean
                                  examples:
                                    - true
                            relationships:
                              description: The relationships of the Location Type (Only present when expanded in the request)
                              type: object
                              properties:
                                categories:
                                  description: The Categories associated with the Location Type
                                  type: object
                          required:
                            - id
                            - type
                            - attributes
                        - title: ProfilePicture
                          description: Represents the standard schema for the resource profile image
                          type: object
                          properties:
                            id:
                              description: The unique string identifier of the Profile Picture record.
                              type:
                                - string
                                - 'null'
                              examples:
                                - '123'
                            type:
                              description: The resource type. Always 'profile-picture' for Profile Picture records.
                              type: string
                              enum:
                                - profile-picture
                              examples:
                                - profile-picture
                            attributes:
                              description: An object containing the Profile Picture attributes.
                              type: object
                              properties:
                                profile_picture_id:
                                  description: The ID of the Profile Picture
                                  type: integer
                                  examples:
                                    - 22
                                  readOnly: true
                                path:
                                  description: The full path of the original image
                                  type: string
                                  format: uri
                                  examples:
                                    - https://api.infraspeak.com/tmp/bebc3cd8efca9c6af8618d1016c163d3.jpeg
                                path_icon:
                                  description: The full path of the image as a icon
                                  type: string
                                  format: uri
                                  examples:
                                    - https://api.infraspeak.com/tmp/b80bd97ee33af2da479e40e4b64a811.jpeg
                                date_uploaded:
                                  description: |
                                    The timestamp when the picture was uploaded
                                    This field uses the ISO 8601 format.
                                  type: string
                                  format: date-time
                                  examples:
                                    - '2025-01-31T12:34:48.000000Z'
                              required:
                                - profile_picture_id
                                - path
                                - path_icon
                                - date_uploaded
                          required:
                            - id
                            - type
                            - attributes
                        - title: Stock
                          description: Stock model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Stock
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - stock
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                stock_id:
                                  description: ID of the Stock
                                  type: integer
                                  examples:
                                    - 1
                                  readOnly: true
                                stock_movement_id:
                                  description: ID of the last Stock Movement of the Stock
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 1
                                  readOnly: true
                                action:
                                  description: Action performed for the stock
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                warehouse_id:
                                  description: ID of the warehouse associated with the stock
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                material_id:
                                  description: ID of the material associated with the stock
                                  type: integer
                                  readOnly: true
                                quantity:
                                  description: Quantity of the material present in the stock
                                  type: number
                                  readOnly: true
                                mean_price:
                                  description: Mean price of the material associated with the stock
                                  type:
                                    - number
                                    - 'null'
                                  readOnly: true
                                observation:
                                  description: Description or notes of the stock
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                date:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  examples:
                                    - '2020-08-28 17:12:00'
                                  readOnly: true
                                failure_id:
                                  description: ID of the failure associated with the stock
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                schedule_work_id:
                                  description: ID of the schedule work associated with this stock
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                mean_price_manually_updated:
                                  description: Mean price of the stock (if it was manually updated)
                                  type: boolean
                                  default: false
                                  readOnly: true
                                date_updated:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  examples:
                                    - '2020-08-28 17:12:00'
                                  readOnly: true
                                destination_id:
                                  description: >-
                                    ID of the destination warehouse of the stock. Only present if the stock action is
                                    "MOVED_FROM"
                                  type: integer
                                  readOnly: true
                                source_id:
                                  description: >-
                                    ID of the origin warehouse of the stock. Only present if the stock action is
                                    "MOVED_TO"
                                  type: integer
                                  readOnly: true
                          required:
                            - id
                            - type
                            - attributes
                        - title: Material
                          description: Material model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Material
                              type: string
                              examples:
                                - '1'
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - material
                              examples:
                                - material
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                material_id:
                                  description: ID of the material
                                  type: integer
                                  examples:
                                    - 1
                                  readOnly: true
                                parent_id:
                                  description: ID of the associated folder of the material
                                  type: integer
                                  examples:
                                    - 1
                                  readOnly: true
                                name:
                                  description: Name of the material
                                  type: string
                                  examples:
                                    - Chair
                                code:
                                  description: Code of the material
                                  type: string
                                  examples:
                                    - CH-00001
                                full_code:
                                  description: Full code of the material (folders prefix included)
                                  type: string
                                  examples:
                                    - FOLDER.CH-00001
                                  readOnly: true
                                observations:
                                  description: Material observations
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - This is a observation
                                is_real:
                                  description: Indicates if this is a real material or a parent folder of materials
                                  type: boolean
                                  examples:
                                    - true
                                units:
                                  description: Indicates which kind of unit should this material be measured with
                                  type: string
                                  examples:
                                    - un
                                mean_price:
                                  description: Mean price of the material
                                  examples:
                                    - 8
                                has_children:
                                  description: Indicates if this material is a parent of other materials
                                  type: boolean
                                  examples:
                                    - true
                                default_sell_price:
                                  description: The default sell price of the material
                                  type: number
                                  examples:
                                    - 10
                                default_sell_vat:
                                  description: The default sell VAT of the material
                                  type: number
                                  examples:
                                    - 23
                                is_from_network:
                                  description: Indicates if the material was shared via Infraspeak Network
                                  type: boolean
                                  examples:
                                    - false
                                purchase_consumption_type:
                                  description: Purchase consumption type of the material
                                  type: string
                                  enum:
                                    - INHERIT
                                    - AUTOMATIC
                                    - MANUAL
                                  examples:
                                    - INHERIT
                          required:
                            - id
                            - type
                            - attributes
                    uniqueItems: true
                required:
                  - data
        '302':
          description: Found
          headers:
            Location:
              schema:
                type: string
              description: Indicates the location we are being redirected to
              required: true
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
    delete:
      operationId: deleteElement
      tags:
        - Elements
      summary: Delete Element (Asset)
      description: Deletes a specific Element (Asset) identified by its ID.
      parameters:
        - name: elementId
          in: path
          description: Element ID
          required: true
          schema:
            type: string
          examples:
            default:
              value: '12345'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                title: Deleted
                type: object
                properties:
                  status:
                    description: Indicates the outcome of the operation. Always 'success' for this response type.
                    type: string
                    examples:
                      - success
                  data:
                    description: >-
                      Placeholder for response data, which is intentionally null for this operation's successful
                      outcome.
                    type:
                      - string
                      - 'null'
                    examples:
                      - null
                deprecated: true
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '403':
          description: Forbidden. The action can not be fulfilled.
          content:
            application/json:
              schema:
                title: 403 Forbidden
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 403
                      message:
                        type: string
                        examples:
                          - Action unauthorized
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 403
                      message: Action unauthorized
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '409':
          description: Server conflicts. Data constraint violations or concurrent modification exceptions occurred.
          content:
            application/json:
              schema:
                title: 409 Server conflicts
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 409
                      message:
                        type: string
                        examples:
                          - Data constraint violations or concurrent modification exceptions
                      more_info:
                        type: string
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
      x-toolbox: true
    patch:
      operationId: updateElement
      tags:
        - Elements
      summary: Update Element (Asset)
      description: Updates specific attributes of an existing Element (Asset). Only provided fields are updated.
      parameters:
        - name: elementId
          in: path
          description: Element ID
          required: true
          schema:
            type: string
          examples:
            default:
              value: '12345'
      requestBody:
        content:
          application/json:
            schema:
              description: Payload required to update a Element (Asset)
              type: object
              properties:
                nfc_code:
                  description: |
                    Optional NFC code for the Element.
                    When available, it can help to quickly identify the Element.
                  type:
                    - string
                    - 'null'
                  examples:
                    - ABC1
                bar_code:
                  description: |
                    Optional bar code for the Element.
                    When available, it can help to quickly identify the Element.
                  type:
                    - string
                    - 'null'
                  examples:
                    - 123C
                latitude:
                  description: |
                    Optional geographic latitude coordinate for the Element's precise location.
                    Essential for visualizing where the Element is on the map.
                    - Required when longitude is filled
                  type:
                    - number
                    - 'null'
                  examples:
                    - -8.189341
                longitude:
                  description: |
                    Optional geographic longitude coordinate for the Element's precise location.
                    Essential for visualizing where the Element is on the map.
                    - Required when latitude is filled
                  type:
                    - number
                    - 'null'
                  examples:
                    - 5.1893312
                observation:
                  description: Optional notes, remarks, or additional descriptive information about the Element.
                  type:
                    - string
                    - 'null'
                  examples:
                    - A blue chair
                code:
                  description: |
                    Optional code for the Element within its context (e.g., within the Entity or Category).
                    Useful for quick reference or integration purposes.
                  type:
                    - string
                    - 'null'
                  examples:
                    - 123A
                local_id:
                  description: >
                    Mandatory ID of the associated Location (where the Element is situated).

                    - Must reference a Location from `GET /locations`.

                    - The Location must be of type "location". Locations of type "building" or "location-folder" are NOT
                    allowed.
                  type: integer
                  examples:
                    - 345
                maintenance_policy_id:
                  description: |
                    Mandatory ID of the associated Maintenance Policy.
                    - Must reference a Maintenance Policy from `GET /maintenance-policies`.
                    - The Maintenance Policy must belong to the same Category specified in `category_id`.
                  type: integer
                  examples:
                    - 678
                cost_center_id:
                  description: |
                    ID of the associated Cost Center.
                    - Must reference a Cost Center from `GET /cost-centers`.
                  type:
                    - integer
                    - 'null'
                  examples:
                    - 758
                acquisition_cost:
                  description: |
                    Optional acquisition Cost of the element. Required with:
                    - lifetime
                    - residual_value
                  type:
                    - number
                    - 'null'
                  examples:
                    - 12.3
                acquisition_date:
                  description: |
                    Optional date (and time) when the Element was acquired (or put into service).
                    Uses ISO 8601 `date-time` format.
                  type:
                    - string
                    - 'null'
                  format: date-time
                  examples:
                    - '2020-08-28 17:12:00'
                supplier_name:
                  description: Optional name of the vendor or supplier from whom the Element was acquired.
                  type:
                    - string
                    - 'null'
                  examples:
                    - Global Tech Solutions Inc.
                lifetime:
                  description: |
                    Optional expected useful lifetime of the Element in years.
                    Used for depreciation or replacement planning.
                    For this field, `acquisition_cost` is required.
                  type:
                    - number
                    - 'null'
                  examples:
                    - 10.2
                residual_value:
                  description: |
                    Optional estimated residual or salvage value of the Element at the end of its useful lifetime.
                    For this field, `acquisition_cost` is required.
                  type:
                    - number
                    - 'null'
                  examples:
                    - 7
                stoppage_cost:
                  description: Optional estimated cost incurred of downtime if this Element fails or stops working.
                  type:
                    - number
                    - 'null'
                  examples:
                    - 25
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: Element
                    description: Represents an Element (Asset) structure details
                    type: object
                    properties:
                      id:
                        description: The unique string identifier of the Element record.
                        type: string
                        readOnly: true
                        examples:
                          - '123'
                      type:
                        description: The resource type. Always 'element' for Element records.
                        type: string
                        enum:
                          - element
                        readOnly: true
                        examples:
                          - element
                      attributes:
                        description: An object containing the Element's attributes.
                        type: object
                        properties:
                          cost_center_id:
                            description: The ID of the Cost Center associated with this Element, if available.
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 758
                          type:
                            description: |
                              The specific type of the Element.
                              Allowing to identify if a Element is a equipment or local
                            type: string
                            enum:
                              - LOCAL
                              - EQUIPMENT
                            examples:
                              - EQUIPMENT
                          barcode:
                            description: The barcode value associated with the Element, if available.
                            type:
                              - string
                              - 'null'
                            examples:
                              - N123T
                          code:
                            description: The assigned code or identifier for the Element, often used for quick reference.
                            type:
                              - string
                              - 'null'
                            examples:
                              - 123A
                          created_at:
                            description: |
                              The timestamp when the Element record was created.
                              This field uses the ISO 8601 format.
                            type: string
                            format: date-time
                            readOnly: true
                            examples:
                              - '2019-06-22T17:26:27.000000Z'
                          date_deleted:
                            description: The timestamp when the Element was marked as deleted (soft delete). Null if not deleted.
                            type:
                              - string
                              - 'null'
                            format: date-time
                            readOnly: true
                            examples:
                              - null
                          element_id:
                            description: The unique numeric identifier for the Element record (matches the top-level 'id').
                            type: integer
                            readOnly: true
                            examples:
                              - 123
                          element_uuid:
                            description: The universally unique identifier (UUID) for the Element record.
                            type: string
                            format: uuid
                            readOnly: true
                            examples:
                              - f81d4fae-7dec-11d0-a765-00a0c91e6bf6
                          entity_id:
                            description: The ID of the parent Entity this Element belongs to.
                            type: integer
                            examples:
                              - 456
                          failures_count:
                            description: A counter indicating the number of open Failures (Work orders) for this element.
                            type: integer
                            readOnly: true
                            examples:
                              - 0
                          has_bar_code:
                            description: Flag indicating whether the Element has an associated barcode.
                            type: boolean
                            examples:
                              - false
                          has_nfc:
                            description: Flag indicating whether the Element is equipped with an NFC tag.
                            type: boolean
                            examples:
                              - true
                          has_pmp:
                            description: |
                              Flag indicating whether the element has PMP (Preventive Maintenance Plan)
                              * Only present when the query parameter `showHasPMP` is set to true
                            type: boolean
                            examples:
                              - false
                          is_direct_page_accessible:
                            description: Flag indicating whether the element is accessible from Direct pages.
                            type: boolean
                            examples:
                              - true
                          is_from_network:
                            description: >-
                              Flag indicating whether the element is part of the Network feature (if it has been
                              shared).
                            type: boolean
                            examples:
                              - false
                          last_modified:
                            description: |
                              The timestamp of the last recorded modification or action related to the Element.
                              This field uses the DATETIME format (YYYY-MM-DD HH:MM:SS).
                            type:
                              - string
                              - 'null'
                            readOnly: true
                            examples:
                              - '2024-07-25 12:57:33'
                          latitude:
                            description: The geographical latitude coordinate of the Element, if available.
                            type:
                              - number
                              - 'null'
                            format: float
                            examples:
                              - 41.1458
                          local_id:
                            description: The ID of the Local (Location) where this Element belongs.
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 445
                          longitude:
                            description: The geographical longitude coordinate of the Element, if available.
                            type:
                              - number
                              - 'null'
                            format: float
                            examples:
                              - 42.1458
                          maintenance_policy_id:
                            description: The ID of the Maintenance Policy associated with this Element, if available.
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 659
                          matched_element:
                            title: MatchedElement
                            description: |
                              The matched element associated with this element.
                            type:
                              - object
                              - 'null'
                            properties:
                              type:
                                description: The type of the matched element
                                type: string
                                enum:
                                  - LOCAL
                                  - EQUIPMENT
                                examples:
                                  - EQUIPMENT
                              code:
                                description: Code of the matched element
                                type: string
                                examples:
                                  - ASSET.1.CODE
                              id:
                                description: ID of the matched element
                                type: integer
                                examples:
                                  - 12
                              is_from_network:
                                description: Flag that indicates if the matched element is from network or not
                                type: boolean
                                examples:
                                  - false
                          metering:
                            description: >
                              Element measurements in array format

                              * Only available for the single-item element endpoint

                              * Only present when the query parameter `showMeteringData` is set to true, and if there
                              are any measurements. Otherwise, the field will not be sent
                            type: array
                            items:
                              type: object
                              properties:
                                type:
                                  description: The type of measurement
                                  type: string
                                  enum:
                                    - RANGE
                                    - TEXT
                                    - CUMULATIVE
                                    - CATALOG
                                    - AUDIT
                                  examples:
                                    - CATALOG
                                category_metering_id:
                                  description: The ID of the Category Metering associated with this measurement.
                                  type: integer
                                  examples:
                                    - 1
                                element_registry_id:
                                  description: The ID of the Element Registry associated with this measurement.
                                  type: integer
                                  examples:
                                    - 2
                                max_value:
                                  description: The maximum value of this measurement
                                  type:
                                    - number
                                    - 'null'
                                  examples:
                                    - 15
                                min_value:
                                  description: The minimum value of this measurement
                                  type:
                                    - number
                                    - 'null'
                                  examples:
                                    - 5
                                name:
                                  description: Name of this measurement.
                                  type: string
                                  examples:
                                    - Lorem
                                statistics:
                                  description: Current measurement statistics
                                  oneOf:
                                    - description: Standard statistic for most types of measurements
                                      type: object
                                      properties:
                                        max:
                                          description: The maximum value of this statistic
                                          type: string
                                          examples:
                                            - '235'
                                        min:
                                          description: The minimum value of this statistic
                                          type: string
                                          examples:
                                            - '2'
                                        avg:
                                          description: The average value of this statistic
                                          type: string
                                          examples:
                                            - '109.17'
                                        stddev_samp:
                                          description: >
                                            The sample standard deviation of the metering readings.

                                            Indicates the data point spread around the average.

                                            Lower values mean data is closer to the average; higher values indicate a
                                            wider spread.
                                          type: string
                                          examples:
                                            - '100.68'
                                    - description: Statistics for `CATALOG` measurements type
                                      type: object
                                      properties:
                                        last_value:
                                          description: The last value of this measurement was recorded
                                          type: string
                                          examples:
                                            - option1
                                        las_reading_time:
                                          description: The date of the last value of this measurement was recorded
                                          type: string
                                          examples:
                                            - '2021-11-24T15:25:25+00:00'
                                unit:
                                  description: Name of the type of measurement unit.
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - UN
                                values:
                                  type: array
                                  items: {}
                          nfc_code:
                            description: The element's NFC tag code, if available.
                            type:
                              - string
                              - 'null'
                            examples:
                              - A123B
                          observation:
                            description: Optional notes or observations recorded for the Element.
                            type:
                              - string
                              - 'null'
                            examples:
                              - Lorem ipsum dolor sit amet, consectetur adipiscing elit
                          updated_at:
                            description: |
                              The timestamp when the Element record was last updated.
                              This field uses the ISO 8601 format.
                            type: string
                            format: date-time
                            readOnly: true
                            examples:
                              - '2025-01-31T12:34:48.000000Z'
                        required:
                          - element_id
                          - type
                          - code
                          - entity_id
                          - observation
                          - has_nfc
                          - has_bar_code
                          - date_deleted
                          - failures_count
                          - nfc_code
                          - barcode
                          - last_modified
                          - local_id
                          - latitude
                          - longitude
                          - is_from_network
                          - element_uuid
                          - is_direct_page_accessible
                          - cost_center_id
                          - created_at
                          - updated_at
                      meta:
                        type: object
                        properties:
                          custom_fields:
                            type:
                              - object
                              - 'null'
                            additionalProperties:
                              oneOf:
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - SELECT
                                      examples:
                                        - SELECT
                                    value:
                                      description: The current values of the Custom Field in this resource
                                      type:
                                        - array
                                        - 'null'
                                      items:
                                        type: object
                                        properties:
                                          option_id:
                                            description: The ID of the selected option
                                            type: integer
                                            examples:
                                              - 123
                                          option_code:
                                            description: The code of the selected option
                                            type:
                                              - string
                                              - 'null'
                                            examples:
                                              - OP01
                                          value:
                                            description: The value of the selected option
                                            type: string
                                            examples:
                                              - My Option 1
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: The type settings for the Custom Field
                                          type: object
                                          properties:
                                            allow_multiple_selection:
                                              description: Indicates if the Custom Field supports selecting multiple values
                                              type: boolean
                                              examples:
                                                - true
                                            managed_by_integrations:
                                              description: Indicates if the Custom Field options are only managed by integrations
                                              type: boolean
                                              examples:
                                                - true
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - TEXT
                                      examples:
                                        - TEXT
                                    value:
                                      description: The current value of the Custom Field in this resource
                                      type:
                                        - string
                                        - 'null'
                                      examples:
                                        - abc
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: >-
                                            The type settings for the Custom Field (Empty for Custom Fields of type
                                            TEXT)
                                          type: object
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - BOOLEAN
                                      examples:
                                        - BOOLEAN
                                    value:
                                      description: The current value of the Custom Field in this resource
                                      type:
                                        - boolean
                                        - 'null'
                                      examples:
                                        - true
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: >-
                                            The type settings for the Custom Field (There are none for the Custom Field
                                            Boolean type)
                                          type: object
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - RELATIONSHIP
                                      examples:
                                        - RELATIONSHIP
                                    value:
                                      description: The current values of the Custom Field in this resource
                                      type:
                                        - array
                                        - 'null'
                                      items:
                                        type: object
                                        properties:
                                          related_to_type:
                                            description: The type of object that is selected as the Custom Field Values
                                            type: string
                                            enum:
                                              - CLIENT
                                              - CONTACT
                                            examples:
                                              - CLIENT
                                          related_to_id:
                                            description: The ID of object that is selected as the Custom Field Value
                                            type: integer
                                            examples:
                                              - 123
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: The type settings for the Custom Field
                                          type: object
                                          properties:
                                            allow_multiple_selection:
                                              description: Indicates if the Custom Field allows multiple selection
                                              type: boolean
                                              examples:
                                                - false
                                            relationship_object:
                                              description: The type of object that is selected as the Custom Field Values
                                              type: string
                                              enum:
                                                - CLIENT
                                                - CONTACT
                                              examples:
                                                - CLIENT
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - DATETIME
                                      examples:
                                        - DATETIME
                                    value:
                                      description: The current value of the Custom Field in this resource
                                      type:
                                        - string
                                        - 'null'
                                      format: date-time
                                      examples:
                                        - '2025-12-12 12:39:00'
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: The type settings for the Custom Field
                                          type: object
                                          properties:
                                            allow_past_dates:
                                              description: Indicates if this Custom Field support past dates
                                              type: boolean
                                              examples:
                                                - false
                                            allow_future_dates:
                                              description: Indicates if this Custom Field support future dates
                                              type: boolean
                                              examples:
                                                - true
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - NUMBER
                                      examples:
                                        - NUMBER
                                    value:
                                      description: The current value of the Custom Field in this resource
                                      type:
                                        - integer
                                        - 'null'
                                      examples:
                                        - 12
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: The type settings for the Custom Field
                                          type: object
                                          properties:
                                            min:
                                              description: Indicates the minimum value for the Custom Field
                                              type:
                                                - integer
                                                - 'null'
                                              examples:
                                                - 1
                                            max:
                                              description: Indicates the maximum value for the Custom Field
                                              type:
                                                - integer
                                                - 'null'
                                              examples:
                                                - 3
                              discriminator:
                                propertyName: field_type
                    required:
                      - id
                      - type
                      - attributes
                  included:
                    description: >
                      List of related resources to be included in the response.

                      * The related resources will be present according to the parameters that have been sent via the
                      `expanded` query parameter
                    type: array
                    items:
                      anyOf:
                        - title: AndroidElementAuditStats
                          description: >
                            Audit Stats of an element

                            Details maximum potential, current recorded, and current achievable maximum values from
                            audit measurements.

                            * Schema used only for the Android application
                          type: object
                          properties:
                            id:
                              description: The unique string identifier of the Audit Stats record.
                              type:
                                - string
                                - 'null'
                              examples:
                                - '123'
                            type:
                              description: The resource type. Always 'audit_stats' for Audit Stats records.
                              type: string
                              enum:
                                - audit_stats
                              examples:
                                - audit_stats
                            attributes:
                              description: An object containing the Audit Stats attributes.
                              type: object
                              properties:
                                max_value:
                                  description: |
                                    The maximum potential value or weight defined for this measurement category
                                    associated with the asset. It represents the sum of the maximum weights
                                    of all related catalog entries for this category.
                                  type: number
                                  examples:
                                    - 100
                                current_value:
                                  description: |
                                    The current value or weight recorded for this measurement. If no value
                                    has been recorded, this will be 0.
                                  type: number
                                  examples:
                                    - 75
                                current_max_value:
                                  description: |
                                    The current maximum potential value achievable based on the recorded
                                    measurements. It sums the maximum weights for the catalog entries that
                                    currently have a recorded value.
                                  type: number
                                  examples:
                                    - 100
                              required:
                                - max_value
                                - current_value
                                - current_max_value
                          required:
                            - id
                            - type
                            - attributes
                        - title: ElementAuditStats
                          description: >
                            Audit Stats of an element

                            Details maximum potential, current recorded, and current achievable maximum values from
                            audit measurements.
                          type: object
                          properties:
                            id:
                              description: The unique string identifier of the Audit Stats record.
                              type:
                                - string
                                - 'null'
                              examples:
                                - '123'
                            type:
                              description: The resource type. Always 'audit_stats' for Audit Stats records.
                              type: string
                              enum:
                                - audit_stats
                              examples:
                                - audit_stats
                            attributes:
                              description: An object containing the Audit Stats attributes.
                              type: object
                              properties:
                                category_id:
                                  description: The ID of the Category associated with this Audit Stats.
                                  type: integer
                                  examples:
                                    - 1
                                max_value:
                                  description: |
                                    The maximum potential value or weight defined for this measurement category
                                    associated with the asset. It represents the sum of the maximum weights
                                    of all related catalog entries for this category.
                                  type: number
                                  examples:
                                    - 100
                                current_value:
                                  description: |
                                    The current value or weight recorded for this measurement. If no value
                                    has been recorded, this will be 0.
                                  type: number
                                  examples:
                                    - 75
                                current_max_value:
                                  description: |
                                    The current maximum potential value achievable based on the recorded
                                    measurements. It sums the maximum weights for the catalog entries that
                                    currently have a recorded value.
                                  type: number
                                  examples:
                                    - 100
                                schedule_work_id:
                                  description: The ID of the Schedule Work associated with this Audit Stats.
                                  type: integer
                                  examples:
                                    - 2
                              required:
                                - max_value
                                - current_value
                                - current_max_value
                                - category_id
                                - schedule_work_id
                          required:
                            - id
                            - type
                            - attributes
                        - title: ElementCharacteristic
                          description: Element Characteristic structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Element Characteristic
                              type: string
                              readOnly: true
                              examples:
                                - '123'
                            type:
                              description: The resource type. Always 'element-characteristic' for ElementCharacteristic records.
                              type: string
                              enum:
                                - element-characteristic
                              readOnly: true
                              examples:
                                - element-characteristic
                            attributes:
                              type: object
                              properties:
                                element_characteristic_id:
                                  description: ID of the Element Characteristic
                                  type: integer
                                  examples:
                                    - 123
                                element_id:
                                  description: ID of the associated Element
                                  type: integer
                                  examples:
                                    - 327
                                characteristic_id:
                                  description: ID of the associated Characteristic
                                  type: integer
                                  examples:
                                    - 587
                                value:
                                  description: >-
                                    Value of the Element Characteristic. The type of this value depends on the
                                    characteristic_type (can be text or number or null)
                                  oneOf:
                                    - type: string
                                      examples:
                                        - Good
                                    - type: number
                                      examples:
                                        - 147.85
                                    - type: 'null'
                                material_id:
                                  description: ID of the associated Material
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 687
                                quantity:
                                  description: Quantity of the material
                                  type:
                                    - number
                                    - 'null'
                                  examples:
                                    - 893
                                characteristic_catalog_id:
                                  description: ID of the associated Characteristic Catalog
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 687
                                is_from_network:
                                  description: Whether the Element Characteristic is received from the network
                                  type: boolean
                                  examples:
                                    - false
                              required:
                                - element_characteristic_id
                                - element_id
                                - characteristic_id
                                - value
                                - material_id
                                - quantity
                                - characteristic_catalog_id
                                - is_from_network
                          required:
                            - id
                            - type
                            - attributes
                        - title: ElementEconomic
                          description: Element Economic model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Element Economic
                              type: string
                              examples:
                                - '123'
                              readOnly: true
                            type:
                              description: The resource type. Always 'element_economic' for ElementEconomic records.
                              type: string
                              enum:
                                - element_economic
                              examples:
                                - element_economic
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                element_economic_id:
                                  description: ID of the Element Economic
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 123
                                  readOnly: true
                                acquisition_cost:
                                  description: Acquisition cost of the Element
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - '25.9'
                                lifetime:
                                  description: Lifetime of the Element
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 3
                                supplier_name:
                                  description: Name of the Element Supplier
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - John Doe
                                acquisition_date:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - type:
                                        - string
                                        - 'null'
                                      examples:
                                        - '2020-08-28 17:12:00'
                                      readOnly: true
                                stoppage_cost:
                                  description: Stoppage cost of the Element
                                  type:
                                    - number
                                    - 'null'
                                  examples:
                                    - 75.9
                                residual_value:
                                  description: Residual value of the Element
                                  type:
                                    - number
                                    - 'null'
                                  examples:
                                    - 2
                                actual_value:
                                  description: Actual value of the Element
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - '75.85'
                                annual_depreciation:
                                  description: Annual depreciation of the Element
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - '54.3687'
                                deperciation_tax:
                                  description: |
                                    Depreciation tax of the Element
                                    * Yes, we have a typo here
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - '50.00'
                                month_life:
                                  description: Month life of the Element
                                  type:
                                    - number
                                    - 'null'
                                  examples:
                                    - 1
                                monthly_depreciation:
                                  description: Monthly depreciation of the Element
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - '0.9542'
                                total_depreciated:
                                  description: Total depreciation of the Element
                                  type:
                                    - string
                                    - 'null'
                                detailed_costs_not_scheduled:
                                  description: Array of detailed not scheduled costs. (Can be an empty array)
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      label:
                                        description: Label of the cost
                                        type: string
                                        examples:
                                          - 5-2025
                                      group_start_time:
                                        type:
                                          - string
                                          - 'null'
                                        format: date-time
                                        examples:
                                          - '2025-05-01 00:00:00+00'
                                        readOnly: true
                                      labor_cost:
                                        description: The labor cost
                                        type: string
                                        examples:
                                          - '0.00'
                                      cumulative_labor_cost:
                                        description: The cumulative labor cost
                                        type: string
                                        examples:
                                          - '0.00'
                                      material_cost:
                                        description: The material cost
                                        type: string
                                        examples:
                                          - '0.00'
                                      cumulative_material_cost:
                                        description: The cumulative material cost
                                        type: string
                                        examples:
                                          - '0.00'
                                      cumulative_total_cost:
                                        description: The cumulative total cost
                                        type: string
                                        examples:
                                          - '0.00'
                                detailed_costs_scheduled:
                                  description: Array of detailed scheduled costs. (Can be an empty array)
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      label:
                                        description: Label of the cost
                                        type: string
                                        examples:
                                          - 5-2025
                                      group_start_time:
                                        type:
                                          - string
                                          - 'null'
                                        format: date-time
                                        examples:
                                          - '2025-05-01 00:00:00+00'
                                        readOnly: true
                                      labor_cost:
                                        description: The labor cost
                                        type: string
                                        examples:
                                          - '0.00'
                                      cumulative_labor_cost:
                                        description: The cumulative labor cost
                                        type: string
                                        examples:
                                          - '0.00'
                                      material_cost:
                                        description: The material cost
                                        type: string
                                        examples:
                                          - '0.00'
                                      cumulative_material_cost:
                                        description: The cumulative material cost
                                        type: string
                                        examples:
                                          - '0.00'
                                      cumulative_total_cost:
                                        description: The cumulative total cost
                                        type: string
                                        examples:
                                          - '0.00'
                                detailed_costs_failure:
                                  description: Array of detailed failure costs. (Can be an empty array)
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      label:
                                        description: Label of the cost
                                        type: string
                                        examples:
                                          - 5-2025
                                      group_start_time:
                                        type:
                                          - string
                                          - 'null'
                                        format: date-time
                                        examples:
                                          - '2025-05-01 00:00:00+00'
                                        readOnly: true
                                      labor_cost:
                                        description: The labor cost
                                        type: string
                                        examples:
                                          - '0.00'
                                      cumulative_labor_cost:
                                        description: The cumulative labor cost
                                        type: string
                                        examples:
                                          - '0.00'
                                      material_cost:
                                        description: The material cost
                                        type: string
                                        examples:
                                          - '0.00'
                                      cumulative_material_cost:
                                        description: The cumulative material cost
                                        type: string
                                        examples:
                                          - '0.00'
                                      cumulative_total_cost:
                                        description: The cumulative total cost
                                        type: string
                                        examples:
                                          - '0.00'
                              required:
                                - element_economic_id
                                - acquisition_cost
                                - lifetime
                                - supplier_name
                                - acquisition_date
                                - stoppage_cost
                                - residual_value
                                - actual_value
                                - annual_depreciation
                                - deperciation_tax
                                - month_life
                                - monthly_depreciation
                                - total_depreciated
                          required:
                            - id
                            - type
                            - attributes
                        - title: ElementNetworkSharedMapping
                          description: Represents the mapping of an Element (Asset) through the Network
                          type: object
                          properties:
                            id:
                              description: The unique string identifier of the Element Network Shared Mapping  record.
                              type:
                                - string
                                - 'null'
                              examples:
                                - '123'
                            type:
                              description: >-
                                The resource type. Always 'element_network_shared_mapping' for Element Network Shared
                                Mapping records.
                              type: string
                              enum:
                                - element_network_shared_mapping
                              examples:
                                - element_network_shared_mapping
                            attributes:
                              description: An object containing the Element Network Shared Mapping attributes.
                              type: object
                              properties:
                                element_id:
                                  description: The ID of the Element that was shared
                                  type: integer
                                  examples:
                                    - 22
                                  readOnly: true
                                entity_id:
                                  description: The ID of the Entity associated with the Element.
                                  type: integer
                                  examples:
                                    - 12
                                receiver_id:
                                  description: The ID of the receiver (Entity) to which the Element has been shared.
                                  type: integer
                                  examples:
                                    - 214
                                receiver_type:
                                  description: The type of receiver
                                  type: string
                                  enum:
                                    - CLIENT
                                    - SUPPLIER
                                  examples:
                                    - SUPPLIER
                                created_at:
                                  description: |
                                    The timestamp when the record was created.
                                    This field uses the ISO 8601 format.
                                  type: string
                                  format: date-time
                                  examples:
                                    - '2019-06-22T17:26:27.000000Z'
                                updated_at:
                                  description: |
                                    The timestamp when the record was last updated.
                                    This field uses the ISO 8601 format.
                                  type: string
                                  format: date-time
                                  examples:
                                    - '2025-01-31T12:34:48.000000Z'
                              required:
                                - element_id
                                - entity_id
                                - receiver_id
                                - receiver_type
                                - created_at
                                - updated_at
                          required:
                            - id
                            - type
                            - attributes
                        - title: ElementOtherCost
                          description: Element Other Cost model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Element Other Cost
                              type: string
                              examples:
                                - '123'
                              readOnly: true
                            type:
                              description: The resource type. Always 'element_other_cost' for Element Other Cost records.
                              type: string
                              enum:
                                - element_other_cost
                              examples:
                                - element_other_cost
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                element_other_cost_id:
                                  description: >-
                                    The unique numeric identifier for the Element Other Cost record (matches the
                                    top-level 'id').
                                  type: integer
                                  examples:
                                    - 123
                                  readOnly: true
                                element_id:
                                  description: ID of the associated Element
                                  type: integer
                                  examples:
                                    - 123
                                other_cost_id:
                                  description: ID of the associated Other Cost
                                  type: integer
                                  examples:
                                    - 123
                                entity_id:
                                  description: ID of the associated Entity
                                  type: integer
                                  examples:
                                    - 123
                                operator_id:
                                  description: ID of the associated Operator
                                  type: integer
                                  examples:
                                    - 123
                                numeric_value:
                                  description: Numeric value of the Element Other Cost
                                  type:
                                    - number
                                    - 'null'
                                  examples:
                                    - 1.2
                                start_time:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  examples:
                                    - '2020-08-28T17:12:00.000Z'
                                  readOnly: true
                                end_time:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  examples:
                                    - '2020-08-28T17:12:00.000Z'
                                  readOnly: true
                                description:
                                  description: A description about the Element Other Cost
                                  type:
                                    - string
                                    - 'null'
                                interval_value:
                                  description: The duration of the ElementOtherCost in the format (HH-MM-SS)
                                  type: string
                                  examples:
                                    - '00:15'
                                updated_date:
                                  type: string
                                  format: date-time
                                  examples:
                                    - '2020-08-28T17:12:00.000Z'
                                  readOnly: true
                                cost:
                                  description: The cost of the Element Other Cost
                                  type: number
                                  examples:
                                    - 1.2
                          required:
                            - id
                            - type
                            - attributes
                        - title: ElementRegistry
                          description: Represents an Element Registry (Asset Registry) structure details
                          type: object
                          properties:
                            id:
                              description: The unique string identifier of the Element Registry record.
                              type: string
                              readOnly: true
                              examples:
                                - '123'
                            type:
                              description: The resource type. Always 'element_registry' for Element Registry records.
                              type: string
                              enum:
                                - element_registry
                              readOnly: true
                              examples:
                                - element_registry
                            attributes:
                              description: An object containing the Element Registry's attributes.
                              type: object
                              properties:
                                element_registry_id:
                                  description: >-
                                    The unique numeric identifier for the Element Registry record (matches the top-level
                                    'id').
                                  type: integer
                                  examples:
                                    - 123
                                maintenance_procedure_id:
                                  description: >-
                                    The ID of the Maintenance Procedure associated with this Element Registry, if
                                    available.
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 345
                                operator_id:
                                  description: |
                                    The ID of the Operator associated with this Element Registry, if available.
                                    - Helps identify the operator who performed the action that generated the record
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 456
                                work_id:
                                  description: |
                                    The ID of the Work associated with this Element Registry, if available.
                                    - Works are also described in the application as `Planned Jobs`.
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 567
                                schedule_work_id:
                                  description: |
                                    The ID of the Scheduled Work associated with this Element Registry, if available.
                                    - Scheduled Works are also described in the application as `Planned jobs orders`.
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 678
                                status:
                                  description: Indicates the status of the Element Register
                                  type: string
                                  enum:
                                    - PENDING
                                    - CANCELED
                                    - ACTIVE
                                    - COMPLETED
                                  examples:
                                    - COMPLETED
                                element_id:
                                  description: The ID of the Element (Asset) associated with this Element Registry, if available.
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 987
                                start_time:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: |
                                        The timestamp for when the action was started
                                        - Not all actions have a **start_time**
                                        - An example of an action with **start_time** is `SCHEDULED_WORK`
                                      type:
                                        - string
                                        - 'null'
                                end_time:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: |
                                        The timestamp for when the action was finished
                                        - Not all actions have a **end_time**
                                        - An example of an action with **end_time** is `SCHEDULED_WORK`
                                      type:
                                        - string
                                        - 'null'
                                observation:
                                  description: Optional notes or observations recorded for the Element Registry.
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - Lorem ipsum dolor sit amet, consectetur adipiscing elit
                                entity_id:
                                  description: The ID of the parent Entity this Element belongs to.
                                  type: integer
                                  examples:
                                    - 456
                                action:
                                  description: >
                                    The performed action that generated the Element Registry

                                    - Actions can refer to the Element, or they can be about other resources linked to
                                    the Element in some way
                                  type: string
                                  enum:
                                    - ADD_COST
                                    - ADDED
                                    - ADDED_COST_CENTER
                                    - CHANGE_BAR_CODE
                                    - CHANGED_COST_CENTER
                                    - CHANGE_ELEMENT_STATUS
                                    - CHANGE_HOUSEKEEPER_OBSERVATION
                                    - CHANGE_HOUSEKEEPER_STATUS
                                    - CHANGE_IDENTIFIER
                                    - CHANGE_LOCAL
                                    - CHANGE_POLICY
                                    - CHANGE_WORK_ORDER_LOCAL
                                    - DELETE_COST
                                    - DELETED
                                    - DELETED_COST_CENTER
                                    - EDIT_COST
                                    - EDIT_ELEMENT_CHARACTERISTICS
                                    - FAILURE_TASK
                                    - MAINTENANCE_PROCEDURE
                                    - MANUAL_TASK
                                    - NEW_FAILURE
                                    - REMOVE_BAR_CODE
                                    - REMOVE_IDENTIFIER
                                    - SCHEDULED_WORK
                                    - SPECIAL_WORK
                                    - VISIT_BAR_CODE
                                    - VISIT_MANUAL
                                    - VISIT_NFC
                                  examples:
                                    - ADD_COST
                                failure_id:
                                  description: ID of the failure
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 789
                                intervention_id:
                                  description: ID of the intervention
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 875
                                duration:
                                  description: Duration of the action
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - 12 days 22:21:25
                                intervention_estimated_time:
                                  description: >-
                                    Estimate time, in format H:m:s, configured at Intervention level on the moment the
                                    Scheduled Work was completed
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - '01:21:25'
                                maintenance_procedure_estimated_time:
                                  description: >-
                                    Estimated time, in format H:m:s, configured at Task level on the moment the
                                    Scheduled Work was completed
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - '00:41:05'
                                from_local_id:
                                  description: ID of the Local where the action begins
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 756
                                to_local_id:
                                  description: ID of the Local where the action ends
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 755
                                to_maintenance_policy_id:
                                  description: ID of the Maintenance Policy where the action begins
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 742
                                from_maintenance_policy_id:
                                  description: ID of the Maintenance Policy where the action ends
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 364
                                quantity:
                                  description: Quantity used in the action
                                  type:
                                    - number
                                    - 'null'
                                  examples:
                                    - null
                                visit_type:
                                  description: Type of the visit
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - null
                                status_after:
                                  description: Status after the action
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - '1'
                                element_other_cost_id:
                                  description: ID of the element other cost
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 687
                                characteristics_updates:
                                  description: The characteristics updated during the action
                                  type:
                                    - array
                                    - 'null'
                                  items:
                                    type: object
                                    properties:
                                      label:
                                        description: The label of the Characteristic
                                        type: string
                                        examples:
                                          - A05. Weight
                                      newValue:
                                        description: The value after update. Has a mixed type
                                        type: string
                                        examples:
                                          - 2 Kg
                                      oldValue:
                                        description: The value before update. Has a mixed type
                                        type:
                                          - string
                                          - 'null'
                                        examples:
                                          - 6 Kg
                                      characteristicId:
                                        description: The ID of the Characteristic
                                        type: integer
                                        examples:
                                          - 1247
                                element_registry_uuid:
                                  description: The universally unique identifier (UUID) for the Element Registry record.
                                  type: string
                                  format: uuid
                                  readOnly: true
                                  examples:
                                    - f81d4fae-7dec-11d0-a765-00a0c91e6bf6
                                snapshot:
                                  description: >-
                                    A snapshot object containing all the valuable properties affected by the action in
                                    the Assets Registry.
                                  type:
                                    - object
                                    - 'null'
                                  examples:
                                    - {}
                                created_at:
                                  description: |
                                    The timestamp when the Element Registry record was created.
                                    This field uses the ISO 8601 format.
                                  type: string
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2019-06-22T17:26:27.000000Z'
                                updated_at:
                                  description: |
                                    The timestamp when the Element Registry record was last updated.
                                    This field uses the ISO 8601 format.
                                  type: string
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2025-01-31T12:34:48.000000Z'
                              required:
                                - element_registry_id
                                - maintenance_procedure_id
                                - operator_id
                                - work_id
                                - schedule_work_id
                                - status
                                - element_id
                                - start_time
                                - end_time
                                - observation
                                - entity_id
                                - action
                                - failure_id
                                - intervention_id
                                - duration
                                - from_local_id
                                - to_local_id
                                - to_maintenance_policy_id
                                - from_maintenance_policy_id
                                - quantity
                                - visit_type
                                - status_after
                                - element_other_cost_id
                                - characteristics_updates
                                - element_registry_uuid
                                - snapshot
                                - created_at
                                - updated_at
                          required:
                            - id
                            - type
                            - attributes
                        - title: FailureElementNetworkStatus
                          description: Represents the status of an Element (Asset) Failure through the Network
                          type: object
                          properties:
                            id:
                              description: The unique string identifier of the Failure Element Network Status   record.
                              type:
                                - string
                                - 'null'
                              examples:
                                - '123'
                            type:
                              description: >-
                                The resource type. Always 'failure_element_network_status' for Failure Element Network
                                Status records.
                              type: string
                              enum:
                                - failure_element_network_status
                              examples:
                                - failure_element_network_status
                            attributes:
                              description: An object containing the Failure Element Network Status  attributes.
                              type: object
                              properties:
                                element_id:
                                  description: The ID of the Element associated.
                                  type: integer
                                  examples:
                                    - 22
                                  readOnly: true
                                type:
                                  description: The type that identifies the side to which this mapping belongs
                                  type: string
                                  enum:
                                    - SENDER
                                    - RECEIVER
                                  examples:
                                    - SENDER
                                entity_id:
                                  description: The ID of the Entity associated with the Element.
                                  type: integer
                                  examples:
                                    - 12
                                failure_id:
                                  description: The ID of the Failure associated with the Element.
                                  type: integer
                                  examples:
                                    - 15
                                network_element_uuid:
                                  description: The UUID that identifies the Element throughout the Network
                                  type: string
                                  format: uuid
                                  examples:
                                    - e632afe8-a1bf-4702-b5bd-sb51a77dss3
                                network_failure_uuid:
                                  description: The UUID that identifies the Failure throughout the Network
                                  type: string
                                  format: uuid
                                  examples:
                                    - e632afe8-a1bf-4702-b5bd-b1163861ba51
                              required:
                                - entity_id
                                - failure_id
                                - element_id
                          required:
                            - id
                            - type
                            - attributes
                        - title: ElementHealthScoreInfo
                          description: Element Health Score Info model structure details
                          type: object
                          properties:
                            type:
                              type: string
                              enum:
                                - element_health_score_info
                              examples:
                                - element_health_score_info
                            id:
                              type: string
                              example: '1'
                            attributes:
                              type: object
                              properties:
                                element_health_score_info:
                                  type: integer
                                  example: 1
                                health_score_flag:
                                  type: integer
                                  example: 1
                                health_score:
                                  type: number
                                  format: float
                                  example: 0.85
                                last_updated_at:
                                  type: string
                                  format: date-time
                                  examples:
                                    - '2026-02-01T00:00:00+00:00'
                        - title: Category
                          description: Category model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Category
                              type: string
                              examples:
                                - '123'
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - category
                              examples:
                                - category
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                category_id:
                                  description: ID of the Category
                                  type: integer
                                  examples:
                                    - 123
                                  readOnly: true
                                type:
                                  description: >-
                                    The Category type. A "TYPE_OF_EQUIPMENT" Category is directly related to equipments
                                    (e.g. a fridge) and a Category "SOFT_MAINTENANCE" is related to Locations (E.g.
                                    hotel rooms).
                                  type: string
                                  enum:
                                    - SOFT_MAINTENANCE
                                    - TYPE_OF_EQUIPMENT
                                  examples:
                                    - SOFT_MAINTENANCE
                                all_technical_skills:
                                  description: Indicates if this category is associated to all technical skills.
                                  type:
                                    - boolean
                                    - 'null'
                                  examples:
                                    - true
                                code:
                                  description: Code of the Category.
                                  type: string
                                  examples:
                                    - VENT
                                entity_id:
                                  description: Entity ID of the Category.
                                  type: integer
                                  examples:
                                    - 123
                                full_code:
                                  description: Codes of the category's parents concatenated by dot with category code.
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - XYZ.VENT
                                  readOnly: true
                                has_children:
                                  description: Whether the category has subitems or not.
                                  type: boolean
                                  examples:
                                    - true
                                  readOnly: true
                                is_real:
                                  description: Whether the category is a folder (false) or "final" category (true).
                                  type:
                                    - boolean
                                    - 'null'
                                  examples:
                                    - true
                                name:
                                  description: Name of the Category.
                                  type: string
                                  examples:
                                    - Ventilation
                                parent_id:
                                  description: ID of the category parent.
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 123
                            relationships:
                              description: Available relationships of the Category.
                              type: object
                              properties:
                                categoryMeterings:
                                  description: Category Meterings associated to the category.
                                  type: object
                                characteristics:
                                  description: Characteristics associated to the category.
                                  type: object
                                entity:
                                  description: Entity associated to the category.
                                  type: object
                                files:
                                  description: Files associated to the category.
                                  type: object
                                maintenanceProcedures:
                                  description: Maintenance Procedures associated to the category.
                                  type: object
                                maintenancePolicies:
                                  description: Maintenance Policies associated to the category.
                                  type: object
                                problems:
                                  description: Problems associated to the category.
                                  type: object
                                technicalSkills:
                                  description: Technical Skills associated to the category.
                                  type: object
                          required:
                            - id
                            - type
                            - attributes
                        - title: MeteringRegistry
                          description: MeteringRegistry model structure details
                          type: object
                          properties:
                            id:
                              description: ID of MeteringRegistry
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - metering-registry
                            attributes:
                              type: object
                              properties:
                                metering_registry_id:
                                  description: ID of MeteringRegistry
                                  type: integer
                                element_id:
                                  description: ID of Element
                                  type: integer
                                operator_id:
                                  description: ID of Operator
                                  type: integer
                                category_metering_id:
                                  description: ID of Category Metering
                                  type: integer
                                category_metering_catalog_id:
                                  description: ID of Category Metering Catalog
                                  type: integer
                                value:
                                  description: Value of the Metering Registry
                                  type: string
                                weight:
                                  description: Value of the Metering Registry
                                  type:
                                    - integer
                                    - 'null'
                                observation:
                                  description: Observation of the Metering Registry
                                  type: string
                                updated_by:
                                  description: User that updated the Metering Registry
                                  type: string
                                date_created:
                                  description: Date of creation of Metering Registry
                                  type: string
                                automated:
                                  type: boolean
                                last_metering_date:
                                  description: Date of last metering
                                  type: string
                                last_metering_value:
                                  description: Value of last metering
                                  type: string
                                measured_at:
                                  description: Date of measurement
                                  type: string
                                uuid:
                                  description: Uuid of the Metering Registry
                                  type: string
                        - title: MaintenancePolicy
                          description: MaintenancePolicy model structure details
                          type: object
                          properties:
                            id:
                              description: ID of MaintenancePolicy
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - maintenance-policy
                            attributes:
                              type: object
                              properties:
                                maintenance_policy_id:
                                  description: ID of MaintenancePolicy
                                  type: integer
                                name:
                                  description: Maintenance Policy Name
                                  type: string
                                has_cost:
                                  description: Maintenance Policy has cost
                                  type: boolean
                                category_id:
                                  description: ID of Category
                                  type: integer
                        - title: Clients
                          description: Client model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Client
                              type: string
                              examples:
                                - '123'
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - client
                              examples:
                                - client
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                client_id:
                                  description: ID of the Client
                                  type: integer
                                  examples:
                                    - 123
                                client_uuid:
                                  description: UUID of the Client
                                  type: string
                                  format: uuid
                                  examples:
                                    - e632afe8-a1bf-4702-b5bd-b1163861ba51
                                name:
                                  description: Client Name
                                  type: string
                                  examples:
                                    - John Doe
                                code:
                                  description: Client Code
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - JD
                                nif:
                                  description: NIF/ VAT Number of the Client
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - '1234566789'
                                postal_code:
                                  description: Postal Code of the Client
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - 1234-567
                                city:
                                  description: City of the Client
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - Lisbon
                                observations:
                                  description: Additional information
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - abc
                                address:
                                  description: Address of the Client
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - abc
                                country:
                                  description: Country of the Client
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - PT
                                created_at:
                                  description: The datetime of the creation of the Client
                                  type: string
                                  format: date-time
                                  examples:
                                    - '2020-12-03T12:45:00'
                                  readOnly: true
                                updated_at:
                                  description: The datetime of the last update of the Client
                                  type: string
                                  format: date-time
                                  examples:
                                    - '2020-12-03T12:45:00'
                                  readOnly: true
                                has_handshake:
                                  description: Indicates if this Client is "connected" to work on Infraspeak Network.
                                  type: boolean
                                  examples:
                                    - true
                                my_company:
                                  description: Indicates whether it is the entity's default client
                                  type: boolean
                                  examples:
                                    - true
                            relationships:
                              description: The relationships of the Client (Only present when expanded in the request)
                              type: object
                              properties:
                                buildings:
                                  description: The Buildings associated to the Client
                                  type: object
                                contacts:
                                  description: The Contacts associated to the Client
                                  type: object
                                files:
                                  description: The Files associated to the Client
                                  type: object
                                profilePicture:
                                  description: The profile picture of the the Client
                                  type: object
                                operators:
                                  description: The Operators associated to the Client
                                  type: object
                                handshake:
                                  description: The Handshake associated to the Client
                                  type: object
                          required:
                            - id
                            - type
                            - attributes
                        - title: Cost Center
                          description: >
                            Cost Center resource structure details.


                            Cost Centers in Infraspeak can be associated to Lines in Sales and Buy Orders, Failures
                            (Work Orders) or Scheduled Works (Planned Job Orders).
                          type: object
                          properties:
                            id:
                              description: Cost Center ID
                              type: string
                              readOnly: true
                            type:
                              description: Resource type
                              type: string
                              enum:
                                - cost_center
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                name:
                                  description: Name for the Cost Center.
                                  type: string
                                  examples:
                                    - AVAC Corretiva
                                code:
                                  description: Code for the Cost Center
                                  type: string
                                  examples:
                                    - C.AVAC
                                responsible_name:
                                  description: Name for the person responsible for the Cost Center
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - Luis
                                responsible_email:
                                  description: Email for the person responsible for the Cost Center
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - luis@example.com
                                responsible_phone:
                                  description: Phone Number for the person responsible for the Cost Center
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - '+351912345678'
                                responsible_cellphone:
                                  description: Cellphone Number for the person responsible for the Cost Center
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - '+351912345678'
                                observation:
                                  description: User defined Observations for the Cost Center
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - An observation regarding my cost center.
                        - title: Failure
                          description: Failure model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Failure
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - failure
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                failure_id:
                                  description: ID of the Failure
                                  type: integer
                                  readOnly: true
                                  examples:
                                    - 1
                                uuid:
                                  description: Universally Unique Identifier for the Failure
                                  type: string
                                  format: uuid
                                  readOnly: true
                                problem_id:
                                  description: ID of the associated problem
                                  type: integer
                                status:
                                  type: string
                                  enum:
                                    - WAITING_APPROVAL
                                    - WAITING_RESOLUTION
                                    - IN_RESOLUTION
                                    - PAUSED
                                    - COMPLETED
                                    - ARCHIVED
                                  readOnly: true
                                start_date:
                                  type: string
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T08:48:00.000Z'
                                completed_date:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T17:12:00.000Z'
                                approved_date:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T09:30:00.000Z'
                                paused_date:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T13:05:00.000Z'
                                description:
                                  type: string
                                  examples:
                                    - Needs replacement
                                last_status_description:
                                  type: string
                                  examples:
                                    - Completed
                                observations:
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - Needs a new part
                                code:
                                  type: string
                                  examples:
                                    - WO2022
                                fts_vector:
                                  description: Denormalized data of a Failure
                                  type: string
                                priority:
                                  description: Failure priority number being 1 the lowest priority and 4 the highest priority.
                                  type: integer
                                  enum:
                                    - 1
                                    - 2
                                    - 3
                                    - 4
                                client_id:
                                  description: ID of the associated client defined according to the respective `local_id`.
                                  type: integer
                                  readOnly: true
                                entity_id:
                                  description: ID of the Entity of the Failure
                                  type: integer
                                  readOnly: true
                                metering_registry_id:
                                  description: ID of a possible associated metering registry
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                local_id:
                                  description: ID of the location associated to the Failure
                                  type: integer
                                paused_reason_id:
                                  description: ID of the paused reason associated to the Failure
                                  type: integer
                                external_id:
                                  description: External ID to be associated to the Failure
                                  type:
                                    - string
                                    - 'null'
                                report_name:
                                  description: Name of who reported the Failure
                                  type: string
                                solved:
                                  description: Indicates whether the Failure was closed successfully or not
                                  type: boolean
                                  readOnly: true
                                  default: false
                                confirmed:
                                  description: Indicates whether the Failure is confirmed or not
                                  type: boolean
                                  readOnly: true
                                  default: false
                                started:
                                  description: Indicates whether the Failure is started or not
                                  type: boolean
                                  readOnly: true
                                  default: false
                                paused:
                                  description: Indicates whether the Failure is paused or not
                                  type: boolean
                                  readOnly: true
                                  default: false
                                completed:
                                  description: Indicates whether the Failure is completed or not
                                  type: boolean
                                  readOnly: true
                                  default: false
                                archived:
                                  description: Indicates whether the Failure is archived or not
                                  type: boolean
                                  readOnly: true
                                  default: false
                                approved:
                                  description: Indicates whether the Failure is approved or not
                                  type: boolean
                                  readOnly: true
                                  default: false
                                next_schedule:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-29T10:30:00.000Z'
                                message_count:
                                  type: integer
                                  minimum: 0
                                  default: 0
                                  examples:
                                    - 3
                                time_statistics:
                                  type: object
                                  properties:
                                    approved_date:
                                      type:
                                        - string
                                        - 'null'
                                      format: date-time
                                      readOnly: true
                                      examples:
                                        - '2020-08-28T09:30:00.000Z'
                                    last_completed_date:
                                      type:
                                        - string
                                        - 'null'
                                      format: date-time
                                      readOnly: true
                                      examples:
                                        - '2020-08-28T17:12:00.000Z'
                                    last_paused_date:
                                      type:
                                        - string
                                        - 'null'
                                      format: date-time
                                      readOnly: true
                                      examples:
                                        - '2020-08-28T13:05:00.000Z'
                                    started_date:
                                      type:
                                        - string
                                        - 'null'
                                      format: date-time
                                      readOnly: true
                                      examples:
                                        - '2020-08-28T09:45:00.000Z'
                                    time_to_approve:
                                      description: Duration it took to approve the Failure since reported in `ISO8601` format.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - P0Y0M0DT0H42M0S
                                    time_to_complete:
                                      description: Duration it took to complete the Failure since reported in `ISO8601` format.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - P0Y0M0DT8H24M0S
                                    time_to_complete_after_started:
                                      description: >-
                                        Duration it took to complete the Failure since the resolution started in
                                        `ISO8601` format.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - P0Y0M0DT7H27M0S
                                    time_to_start:
                                      description: >-
                                        Duration it took to start the Failure's resolution since reported in `ISO8601`
                                        format.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - P0Y0M0DT0H57M0S
                                    time_to_start_after_approved:
                                      description: >-
                                        Duration it took to start the Failure's resolution since approved in `ISO8601`
                                        format.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - P0Y0M0DT0H15M0S
                                    real_duration:
                                      description: Real duration of the Failure's resolution time in `ISO8601` format.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - P0Y0M0DT7H27M0S
                                supplier_id:
                                  description: ID of the supplier associated to the Failure
                                  type: integer
                                signature_status:
                                  description: Indicates whether the Failure is signed or not
                                  type: string
                                  enum:
                                    - SIGNED
                                    - NOT_SIGNED
                                  default: NOT_SIGNED
                                last_status_change_date:
                                  type: string
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T09:30:00.000Z'
                                approved_by_id:
                                  description: ID of the operator who approved the Failure.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                completed_by_id:
                                  description: ID of the operator who completed the Failure.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                started_by_id:
                                  description: ID of the operator who started the Failure's resolution.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                paused_by_id:
                                  description: ID of the operator who paused the Failure's resolution.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                approved_by:
                                  description: Name of the operator who approved the Failure.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                completed_by:
                                  description: Name of the operator who completed the Failure.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                started_by:
                                  description: Name of the operator who started the Failure's resolution.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                paused_by:
                                  description: Name of the operator who paused the Failure's resolution.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                reported_by:
                                  description: Name of the operator who reported the Failure.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                manpower_duration:
                                  description: Duration of the Failure's manpower time in `ISO8601` format.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                  examples:
                                    - P0Y0M0DT7H27M0S
                                cost_center_id:
                                  description: ID of the cost center associated to the Failure
                                  type:
                                    - integer
                                    - 'null'
                                network_failure_id:
                                  description: ID of the Network Failure
                                  type: integer
                                  readOnly: true
                                  examples:
                                    - 1
                                created_at:
                                  type: string
                                  format: date-time
                                  readOnly: true
                                updated_at:
                                  type: string
                                  format: date-time
                                  readOnly: true
                                date_deleted:
                                  type: string
                                  format: date-time
                                  readOnly: true
                            relationships:
                              type: object
                              properties:
                                approvedBy:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                completedBy:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                createdBy:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                files:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - file
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                location:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - location
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                operator:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                          required:
                            - id
                            - type
                            - attributes
                        - title: Geolocations
                          description: Geolocation model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Geolocation
                              type: string
                              examples:
                                - '1'
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - geolocation
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                related_to_id:
                                  description: Id of Related Object
                                  type: integer
                                  examples:
                                    - 1
                                related_to_type:
                                  description: Type related to
                                  type: string
                                  enum:
                                    - ELEMENT
                                    - LOCAL
                                    - OPERATOR
                                  examples:
                                    - OPERATOR
                                latitude:
                                  description: latitude of the geolocation
                                  type: string
                                  examples:
                                    - '0.0000000'
                                longitude:
                                  description: longitude of the geolocation
                                  type: string
                                  examples:
                                    - '0.0000000'
                                accuracy:
                                  description: accuracy of the geolocation
                                  type: string
                                  examples:
                                    - '10'
                                altitude:
                                  description: altitude of the geolocation
                                  type: string
                                  examples:
                                    - '10'
                                provider:
                                  description: provider of the geolocation
                                  type: string
                                  examples:
                                    - MANUAL
                                states:
                                  description: states of the geolocation
                                  type: array
                                  items:
                                    type: string
                                  examples:
                                    - - WORKING
                                      - FAILURE
                                      - SCHEDULED_WORK
                                thumb:
                                  description: thumbnaill for the map
                                  type: string
                                  examples:
                                    - https://...
                                active:
                                  description: active state of the geolocation
                                  type: boolean
                                  examples:
                                    - true
                                created_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: Date when the Geolocation was created
                                      readOnly: true
                                updated_at:
                                  allOf:
                                    - allOf:
                                        - type:
                                            - string
                                            - 'null'
                                          pattern: >-
                                            ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                            ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                          examples:
                                            - '2021-07-21 18:38:00'
                                        - description: Date when the Geolocation was created
                                          readOnly: true
                                    - description: Date when the Geolocation was last updated
                                label:
                                  description: If related_to_type is 'OPERATOR' then we send his full name as the label
                                  type: string
                                  examples:
                                    - Gabriel Monteiro
                        - title: HousekeeperAssetStatus
                          description: HousekeeperAssetStatus model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the HousekeeperAssetStatus
                              type: string
                              examples:
                                - '1'
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - housekeeper_asset_status
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                status_id:
                                  description: Status Id
                                  type: integer
                                  examples:
                                    - 1
                                element_id:
                                  description: Element Id
                                  type: integer
                                  examples:
                                    - 2
                                observation:
                                  description: Observation
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - Some Observation
                                external_observation:
                                  description: External observation from a PMS Integration
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - Some Observation
                                work_id:
                                  description: ID of the related Work
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 2
                                max_target_status_date:
                                  description: Datetime of the max target status
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  examples:
                                    - '2021-07-20T18:38:00.000Z'
                                assignees:
                                  description: List of the assigned Operators
                                  type:
                                    - array
                                    - 'null'
                                  items:
                                    type: object
                                check_in:
                                  description: Check in
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  examples:
                                    - '2021-07-20T18:38:00.000Z'
                                check_out:
                                  description: Check out
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  examples:
                                    - '2021-07-21T18:38:00.000Z'
                        - title: HousekeeperStatus
                          description: HousekeeperStatus model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the HousekeeperStatus
                              type: string
                              examples:
                                - '1'
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - housekeeper_status
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                status_code:
                                  description: Status code
                                  type: string
                                  examples:
                                    - Status code
                                order:
                                  description: Status order
                                  type: integer
                                  examples:
                                    - 0
                                default:
                                  description: Status order
                                  type: boolean
                                  examples:
                                    - true
                        - title: Location
                          description: Location model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Location
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - location
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                entity_id:
                                  type: integer
                                name:
                                  description: Location name
                                  type: string
                                full_name:
                                  description: Names of the location's parents concatenated by hyphen with location name.
                                  type: string
                                  readOnly: true
                                code:
                                  description: Location code.
                                  type: string
                                full_code:
                                  description: Codes of the location's parents concatenated by dot with location code.
                                  type: string
                                  readOnly: true
                                original_full_code:
                                  description: Location original full code.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                observation:
                                  description: Additional information
                                  type:
                                    - string
                                    - 'null'
                                date_updated:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - '2020-12-03 12:45:00'
                                parent_id:
                                  description: ID of the location parent.
                                  type: integer
                                root_parent_id:
                                  description: ID of the location root parent (of `type` equals to `building`).
                                  type: integer
                                  readOnly: true
                                area:
                                  description: Location area
                                  type:
                                    - number
                                    - 'null'
                                glass_area:
                                  description: Location glass area
                                  type:
                                    - number
                                    - 'null'
                                volume:
                                  description: Location volume
                                  type:
                                    - number
                                    - 'null'
                                orientation:
                                  description: Solar orientation (North, South, West, East)
                                  type:
                                    - string
                                    - 'null'
                                is_from_network:
                                  description: If Location is from network
                                  type: boolean
                                  readOnly: true
                                local_uuid:
                                  description: Location UUID
                                  type: string
                                  format: uuid
                                  readOnly: true
                                assets_count:
                                  description: >-
                                    Cumulative count of assets (equipment) in this location and all its descendants.
                                    Only present when `with_assets_count=true` query parameter is provided.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                associations:
                                  description: >
                                    List of ways the operator is associated with this building. Possible values are
                                    `DIRECT` (via a direct local-operator assignment), `TEAM` (via a team the operator
                                    belongs to), and `CLIENT` (via a client the operator is assigned to).
                                  type: array
                                  items:
                                    type: string
                                    enum:
                                      - DIRECT
                                      - TEAM
                                      - CLIENT
                              required:
                                - name
                                - full_name
                                - code
                                - full_code
                                - observation
                                - date_updated
                            relationships:
                              type: object
                              properties:
                                building:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - building
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                files:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - file
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                operators:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - operator
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                localOrientation:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - localOrientation
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                          required:
                            - id
                            - type
                            - attributes
                        - title: Location type
                          description: Location type model structure details
                          type: object
                          properties:
                            id:
                              description: The ID of the Location Type
                              type: string
                              examples:
                                - '123'
                              readOnly: true
                            type:
                              type: string
                              enum:
                                - location-type
                              examples:
                                - location-type
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                local_type_id:
                                  description: The ID of the Location Type
                                  type: integer
                                  examples:
                                    - 123
                                  readOnly: true
                                name:
                                  description: The name/description of the Location Type
                                  type: string
                                  examples:
                                    - Office
                                usage_type:
                                  description: >-
                                    This is a deprecated field that is no longer used, but it's kept in the response for
                                    backwards compatibility.
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - null
                                usage_number:
                                  description: >-
                                    This is a deprecated field that is no longer used, but it's kept in the response for
                                    backwards compatibility.
                                  type: integer
                                  examples:
                                    - 0
                                entity_id:
                                  description: The ID of the Entity where the Location Type belongs
                                  type: integer
                                  examples:
                                    - 123
                                  readOnly: true
                                general:
                                  description: >-
                                    Indicates if the Location Type is the General Location Type. Every Entity in
                                    Infraspeak contains a General Location Type that cannot be deleted, and all
                                    Locations that don't fit in any other Location Type fall into the General Location
                                    Type.
                                  type: boolean
                                  examples:
                                    - true
                            relationships:
                              description: The relationships of the Location Type (Only present when expanded in the request)
                              type: object
                              properties:
                                categories:
                                  description: The Categories associated with the Location Type
                                  type: object
                          required:
                            - id
                            - type
                            - attributes
                        - title: ProfilePicture
                          description: Represents the standard schema for the resource profile image
                          type: object
                          properties:
                            id:
                              description: The unique string identifier of the Profile Picture record.
                              type:
                                - string
                                - 'null'
                              examples:
                                - '123'
                            type:
                              description: The resource type. Always 'profile-picture' for Profile Picture records.
                              type: string
                              enum:
                                - profile-picture
                              examples:
                                - profile-picture
                            attributes:
                              description: An object containing the Profile Picture attributes.
                              type: object
                              properties:
                                profile_picture_id:
                                  description: The ID of the Profile Picture
                                  type: integer
                                  examples:
                                    - 22
                                  readOnly: true
                                path:
                                  description: The full path of the original image
                                  type: string
                                  format: uri
                                  examples:
                                    - https://api.infraspeak.com/tmp/bebc3cd8efca9c6af8618d1016c163d3.jpeg
                                path_icon:
                                  description: The full path of the image as a icon
                                  type: string
                                  format: uri
                                  examples:
                                    - https://api.infraspeak.com/tmp/b80bd97ee33af2da479e40e4b64a811.jpeg
                                date_uploaded:
                                  description: |
                                    The timestamp when the picture was uploaded
                                    This field uses the ISO 8601 format.
                                  type: string
                                  format: date-time
                                  examples:
                                    - '2025-01-31T12:34:48.000000Z'
                              required:
                                - profile_picture_id
                                - path
                                - path_icon
                                - date_uploaded
                          required:
                            - id
                            - type
                            - attributes
                        - title: Stock
                          description: Stock model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Stock
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - stock
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                stock_id:
                                  description: ID of the Stock
                                  type: integer
                                  examples:
                                    - 1
                                  readOnly: true
                                stock_movement_id:
                                  description: ID of the last Stock Movement of the Stock
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 1
                                  readOnly: true
                                action:
                                  description: Action performed for the stock
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                warehouse_id:
                                  description: ID of the warehouse associated with the stock
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                material_id:
                                  description: ID of the material associated with the stock
                                  type: integer
                                  readOnly: true
                                quantity:
                                  description: Quantity of the material present in the stock
                                  type: number
                                  readOnly: true
                                mean_price:
                                  description: Mean price of the material associated with the stock
                                  type:
                                    - number
                                    - 'null'
                                  readOnly: true
                                observation:
                                  description: Description or notes of the stock
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                date:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  examples:
                                    - '2020-08-28 17:12:00'
                                  readOnly: true
                                failure_id:
                                  description: ID of the failure associated with the stock
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                schedule_work_id:
                                  description: ID of the schedule work associated with this stock
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                mean_price_manually_updated:
                                  description: Mean price of the stock (if it was manually updated)
                                  type: boolean
                                  default: false
                                  readOnly: true
                                date_updated:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  examples:
                                    - '2020-08-28 17:12:00'
                                  readOnly: true
                                destination_id:
                                  description: >-
                                    ID of the destination warehouse of the stock. Only present if the stock action is
                                    "MOVED_FROM"
                                  type: integer
                                  readOnly: true
                                source_id:
                                  description: >-
                                    ID of the origin warehouse of the stock. Only present if the stock action is
                                    "MOVED_TO"
                                  type: integer
                                  readOnly: true
                          required:
                            - id
                            - type
                            - attributes
                        - title: Material
                          description: Material model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Material
                              type: string
                              examples:
                                - '1'
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - material
                              examples:
                                - material
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                material_id:
                                  description: ID of the material
                                  type: integer
                                  examples:
                                    - 1
                                  readOnly: true
                                parent_id:
                                  description: ID of the associated folder of the material
                                  type: integer
                                  examples:
                                    - 1
                                  readOnly: true
                                name:
                                  description: Name of the material
                                  type: string
                                  examples:
                                    - Chair
                                code:
                                  description: Code of the material
                                  type: string
                                  examples:
                                    - CH-00001
                                full_code:
                                  description: Full code of the material (folders prefix included)
                                  type: string
                                  examples:
                                    - FOLDER.CH-00001
                                  readOnly: true
                                observations:
                                  description: Material observations
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - This is a observation
                                is_real:
                                  description: Indicates if this is a real material or a parent folder of materials
                                  type: boolean
                                  examples:
                                    - true
                                units:
                                  description: Indicates which kind of unit should this material be measured with
                                  type: string
                                  examples:
                                    - un
                                mean_price:
                                  description: Mean price of the material
                                  examples:
                                    - 8
                                has_children:
                                  description: Indicates if this material is a parent of other materials
                                  type: boolean
                                  examples:
                                    - true
                                default_sell_price:
                                  description: The default sell price of the material
                                  type: number
                                  examples:
                                    - 10
                                default_sell_vat:
                                  description: The default sell VAT of the material
                                  type: number
                                  examples:
                                    - 23
                                is_from_network:
                                  description: Indicates if the material was shared via Infraspeak Network
                                  type: boolean
                                  examples:
                                    - false
                                purchase_consumption_type:
                                  description: Purchase consumption type of the material
                                  type: string
                                  enum:
                                    - INHERIT
                                    - AUTOMATIC
                                    - MANUAL
                                  examples:
                                    - INHERIT
                          required:
                            - id
                            - type
                            - attributes
                    uniqueItems: true
                required:
                  - data
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '403':
          description: Forbidden. The action can not be fulfilled.
          content:
            application/json:
              schema:
                title: 403 Forbidden
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 403
                      message:
                        type: string
                        examples:
                          - Action unauthorized
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 403
                      message: Action unauthorized
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /failures:
    get:
      operationId: getFailures
      tags:
        - Failures
      summary: List all Failures
      description: >
        This endpoint allows you to list all Failures registered in the system.


        The query parameters described below are to be used with the
        [JQL](../../../../../../../docs/api/.markdown/1.introduction/4-parameters.md).
      parameters:
        - name: approved_date
          in: query
          description: Filter results by the approval date of the Failure.
          schema:
            type: string
            format: date-time
        - name: completed_date
          in: query
          description: Filter results by the completion date of the Failure.
          schema:
            type: string
            format: date-time
        - name: failure_id
          in: query
          description: Filter results by the ID of the Failure
          schema:
            type: integer
        - name: last_status_change_date
          in: query
          description: Filter results by the last status change date of the Failure.
          schema:
            type: string
            format: date-time
        - name: local_id
          in: query
          description: Filter results by the local of the Failure.
          schema:
            type: integer
        - name: problem_id
          in: query
          description: Filter results by the problem of the Failure.
          schema:
            type: integer
        - name: start_date
          in: query
          description: Filter results by the date of report of the Failure.
          schema:
            type: string
            format: date-time
        - name: status
          in: query
          description: Filter results by the status of the Failure.
          schema:
            type: string
            enum:
              - WAITING_APPROVAL
              - WAITING_RESOLUTION
              - IN_RESOLUTION
              - PAUSED
              - COMPLETED
              - ARCHIVED
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      title: Failure
                      description: Failure model structure details
                      type: object
                      properties:
                        id:
                          description: ID of the Failure
                          type: string
                          readOnly: true
                        type:
                          description: Model type
                          type: string
                          enum:
                            - failure
                          readOnly: true
                        attributes:
                          type: object
                          properties:
                            failure_id:
                              description: ID of the Failure
                              type: integer
                              readOnly: true
                              examples:
                                - 1
                            uuid:
                              description: Universally Unique Identifier for the Failure
                              type: string
                              format: uuid
                              readOnly: true
                            problem_id:
                              description: ID of the associated problem
                              type: integer
                            status:
                              type: string
                              enum:
                                - WAITING_APPROVAL
                                - WAITING_RESOLUTION
                                - IN_RESOLUTION
                                - PAUSED
                                - COMPLETED
                                - ARCHIVED
                              readOnly: true
                            start_date:
                              type: string
                              format: date-time
                              readOnly: true
                              examples:
                                - '2020-08-28T08:48:00.000Z'
                            completed_date:
                              type:
                                - string
                                - 'null'
                              format: date-time
                              readOnly: true
                              examples:
                                - '2020-08-28T17:12:00.000Z'
                            approved_date:
                              type:
                                - string
                                - 'null'
                              format: date-time
                              readOnly: true
                              examples:
                                - '2020-08-28T09:30:00.000Z'
                            paused_date:
                              type:
                                - string
                                - 'null'
                              format: date-time
                              readOnly: true
                              examples:
                                - '2020-08-28T13:05:00.000Z'
                            description:
                              type: string
                              examples:
                                - Needs replacement
                            last_status_description:
                              type: string
                              examples:
                                - Completed
                            observations:
                              type:
                                - string
                                - 'null'
                              examples:
                                - Needs a new part
                            code:
                              type: string
                              examples:
                                - WO2022
                            fts_vector:
                              description: Denormalized data of a Failure
                              type: string
                            priority:
                              description: Failure priority number being 1 the lowest priority and 4 the highest priority.
                              type: integer
                              enum:
                                - 1
                                - 2
                                - 3
                                - 4
                            client_id:
                              description: ID of the associated client defined according to the respective `local_id`.
                              type: integer
                              readOnly: true
                            entity_id:
                              description: ID of the Entity of the Failure
                              type: integer
                              readOnly: true
                            metering_registry_id:
                              description: ID of a possible associated metering registry
                              type:
                                - integer
                                - 'null'
                              readOnly: true
                            local_id:
                              description: ID of the location associated to the Failure
                              type: integer
                            paused_reason_id:
                              description: ID of the paused reason associated to the Failure
                              type: integer
                            external_id:
                              description: External ID to be associated to the Failure
                              type:
                                - string
                                - 'null'
                            report_name:
                              description: Name of who reported the Failure
                              type: string
                            solved:
                              description: Indicates whether the Failure was closed successfully or not
                              type: boolean
                              readOnly: true
                              default: false
                            confirmed:
                              description: Indicates whether the Failure is confirmed or not
                              type: boolean
                              readOnly: true
                              default: false
                            started:
                              description: Indicates whether the Failure is started or not
                              type: boolean
                              readOnly: true
                              default: false
                            paused:
                              description: Indicates whether the Failure is paused or not
                              type: boolean
                              readOnly: true
                              default: false
                            completed:
                              description: Indicates whether the Failure is completed or not
                              type: boolean
                              readOnly: true
                              default: false
                            archived:
                              description: Indicates whether the Failure is archived or not
                              type: boolean
                              readOnly: true
                              default: false
                            approved:
                              description: Indicates whether the Failure is approved or not
                              type: boolean
                              readOnly: true
                              default: false
                            next_schedule:
                              type:
                                - string
                                - 'null'
                              format: date-time
                              readOnly: true
                              examples:
                                - '2020-08-29T10:30:00.000Z'
                            message_count:
                              type: integer
                              minimum: 0
                              default: 0
                              examples:
                                - 3
                            time_statistics:
                              type: object
                              properties:
                                approved_date:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T09:30:00.000Z'
                                last_completed_date:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T17:12:00.000Z'
                                last_paused_date:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T13:05:00.000Z'
                                started_date:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T09:45:00.000Z'
                                time_to_approve:
                                  description: Duration it took to approve the Failure since reported in `ISO8601` format.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                  examples:
                                    - P0Y0M0DT0H42M0S
                                time_to_complete:
                                  description: Duration it took to complete the Failure since reported in `ISO8601` format.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                  examples:
                                    - P0Y0M0DT8H24M0S
                                time_to_complete_after_started:
                                  description: >-
                                    Duration it took to complete the Failure since the resolution started in `ISO8601`
                                    format.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                  examples:
                                    - P0Y0M0DT7H27M0S
                                time_to_start:
                                  description: >-
                                    Duration it took to start the Failure's resolution since reported in `ISO8601`
                                    format.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                  examples:
                                    - P0Y0M0DT0H57M0S
                                time_to_start_after_approved:
                                  description: >-
                                    Duration it took to start the Failure's resolution since approved in `ISO8601`
                                    format.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                  examples:
                                    - P0Y0M0DT0H15M0S
                                real_duration:
                                  description: Real duration of the Failure's resolution time in `ISO8601` format.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                  examples:
                                    - P0Y0M0DT7H27M0S
                            supplier_id:
                              description: ID of the supplier associated to the Failure
                              type: integer
                            signature_status:
                              description: Indicates whether the Failure is signed or not
                              type: string
                              enum:
                                - SIGNED
                                - NOT_SIGNED
                              default: NOT_SIGNED
                            last_status_change_date:
                              type: string
                              format: date-time
                              readOnly: true
                              examples:
                                - '2020-08-28T09:30:00.000Z'
                            approved_by_id:
                              description: ID of the operator who approved the Failure.
                              type:
                                - integer
                                - 'null'
                              readOnly: true
                            completed_by_id:
                              description: ID of the operator who completed the Failure.
                              type:
                                - integer
                                - 'null'
                              readOnly: true
                            started_by_id:
                              description: ID of the operator who started the Failure's resolution.
                              type:
                                - integer
                                - 'null'
                              readOnly: true
                            paused_by_id:
                              description: ID of the operator who paused the Failure's resolution.
                              type:
                                - integer
                                - 'null'
                              readOnly: true
                            approved_by:
                              description: Name of the operator who approved the Failure.
                              type:
                                - string
                                - 'null'
                              readOnly: true
                            completed_by:
                              description: Name of the operator who completed the Failure.
                              type:
                                - string
                                - 'null'
                              readOnly: true
                            started_by:
                              description: Name of the operator who started the Failure's resolution.
                              type:
                                - string
                                - 'null'
                              readOnly: true
                            paused_by:
                              description: Name of the operator who paused the Failure's resolution.
                              type:
                                - string
                                - 'null'
                              readOnly: true
                            reported_by:
                              description: Name of the operator who reported the Failure.
                              type:
                                - string
                                - 'null'
                              readOnly: true
                            manpower_duration:
                              description: Duration of the Failure's manpower time in `ISO8601` format.
                              type:
                                - string
                                - 'null'
                              readOnly: true
                              examples:
                                - P0Y0M0DT7H27M0S
                            cost_center_id:
                              description: ID of the cost center associated to the Failure
                              type:
                                - integer
                                - 'null'
                            network_failure_id:
                              description: ID of the Network Failure
                              type: integer
                              readOnly: true
                              examples:
                                - 1
                            created_at:
                              type: string
                              format: date-time
                              readOnly: true
                            updated_at:
                              type: string
                              format: date-time
                              readOnly: true
                            date_deleted:
                              type: string
                              format: date-time
                              readOnly: true
                        relationships:
                          type: object
                          properties:
                            approvedBy:
                              type: object
                              properties:
                                data:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - operator
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                            completedBy:
                              type: object
                              properties:
                                data:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - operator
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                            createdBy:
                              type: object
                              properties:
                                data:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - operator
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                            files:
                              type: object
                              properties:
                                data:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - file
                                        readOnly: true
                                      id:
                                        type: string
                                        readOnly: true
                            location:
                              type: object
                              properties:
                                data:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - location
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                            operator:
                              type: object
                              properties:
                                data:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - operator
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                      required:
                        - id
                        - type
                        - attributes
                  included:
                    description: List of relationships to be included
                    type: array
                    items:
                      anyOf:
                        - title: File
                          description: File model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the File
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - file
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                file_id:
                                  description: File Id
                                  type: integer
                                  readOnly: true
                                file_uuid:
                                  description: File UUID
                                  type: string
                                  readOnly: true
                                related_to:
                                  description: Object which the File is related to
                                  type: string
                                  enum:
                                    - BUILDING
                                    - CATEGORY
                                    - CLIENT
                                    - ELEMENT
                                    - ELEMENT_REGISTRY
                                    - FAILURE
                                    - METERING_REGISTRY
                                    - OPERATOR
                                    - ORDER
                                    - QUOTE
                                    - QUOTE_REQUEST
                                    - RECEIVED_QUOTE
                                    - RECEIVED_QUOTE_REQUEST
                                    - REQUEST
                                    - SELL_ORDER
                                    - SUPPLIER
                                    - SCHEDULE_WORK
                                    - WORK
                                    - SCHEDULED_WORK
                                    - PURCHASE
                                    - PURCHASE_MATERIAL_LINE
                                    - PURCHASE_SERVICE_LINE
                                    - SALE
                                related_to_id:
                                  description: Relations Id
                                  type: integer
                                related_type:
                                  description: Object which the File is related to
                                  type: string
                                  enum:
                                    - BUILDING
                                    - CATEGORY
                                    - CLIENT
                                    - ELEMENT
                                    - ELEMENT_REGISTRY
                                    - FAILURE
                                    - METERING_REGISTRY
                                    - OPERATOR
                                    - ORDER
                                    - QUOTE
                                    - QUOTE_REQUEST
                                    - RECEIVED_QUOTE
                                    - RECEIVED_QUOTE_REQUEST
                                    - REQUEST
                                    - SELL_ORDER
                                    - SUPPLIER
                                    - SCHEDULE_WORK
                                    - WORK
                                  readOnly: true
                                file_label_id:
                                  description: File Label Id
                                  type:
                                    - integer
                                    - 'null'
                                name:
                                  description: File name
                                  type: string
                                  examples:
                                    - my_example_file
                                thumb:
                                  description: URL to the thumbnail, in case the File is an image.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                file_url:
                                  description: URL to the File
                                  type: string
                                  format: uri
                                  readOnly: true
                                description:
                                  type:
                                    - string
                                    - 'null'
                                expire_date:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T17:12:00.000Z'
                                has_reminder:
                                  type: boolean
                                  readOnly: true
                                file_type:
                                  description: Internal type of the file
                                  type: string
                                  enum:
                                    - cad
                                    - compressed
                                    - file
                                    - image
                                    - office
                                    - other
                                    - pdf
                                    - signature
                                    - video
                                  readOnly: true
                                permission_to_technician:
                                  type: boolean
                                  default: true
                                permission_to_manager:
                                  type: boolean
                                  default: true
                                permission_to_direct:
                                  type: boolean
                                  default: false
                                extension:
                                  type: string
                                  enum:
                                    - 3gp
                                    - 3gpp
                                    - bin
                                    - bmp
                                    - cad
                                    - csv
                                    - doc
                                    - docx
                                    - gif
                                    - jpeg
                                    - jpg
                                    - kmz
                                    - mov
                                    - mp4
                                    - odf
                                    - odp
                                    - pdf
                                    - png
                                    - ppt
                                    - pptx
                                    - qt
                                    - rar
                                    - txt
                                    - xls
                                    - xlsx
                                    - zip
                                  readOnly: true
                                network_status:
                                  description: Show the network status of the file.
                                  type: string
                                  enum:
                                    - SHARED
                                    - RECEIVED
                                    - NOT_SHARED
                                shared_with_supplier:
                                  description: Show if the file is currently in a shared status with the supplier.
                                  type: boolean
                                shared_with_client:
                                  description: Show if the file is currently in a shared status with the client.
                                  type: boolean
                                file_size:
                                  type: integer
                                  readOnly: true
                                created_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                  readOnly: true
                          required:
                            - id
                            - type
                            - attributes
                        - title: Location
                          description: Location model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Location
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - location
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                entity_id:
                                  type: integer
                                name:
                                  description: Location name
                                  type: string
                                full_name:
                                  description: Names of the location's parents concatenated by hyphen with location name.
                                  type: string
                                  readOnly: true
                                code:
                                  description: Location code.
                                  type: string
                                full_code:
                                  description: Codes of the location's parents concatenated by dot with location code.
                                  type: string
                                  readOnly: true
                                original_full_code:
                                  description: Location original full code.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                observation:
                                  description: Additional information
                                  type:
                                    - string
                                    - 'null'
                                date_updated:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - '2020-12-03 12:45:00'
                                parent_id:
                                  description: ID of the location parent.
                                  type: integer
                                root_parent_id:
                                  description: ID of the location root parent (of `type` equals to `building`).
                                  type: integer
                                  readOnly: true
                                area:
                                  description: Location area
                                  type:
                                    - number
                                    - 'null'
                                glass_area:
                                  description: Location glass area
                                  type:
                                    - number
                                    - 'null'
                                volume:
                                  description: Location volume
                                  type:
                                    - number
                                    - 'null'
                                orientation:
                                  description: Solar orientation (North, South, West, East)
                                  type:
                                    - string
                                    - 'null'
                                is_from_network:
                                  description: If Location is from network
                                  type: boolean
                                  readOnly: true
                                local_uuid:
                                  description: Location UUID
                                  type: string
                                  format: uuid
                                  readOnly: true
                                assets_count:
                                  description: >-
                                    Cumulative count of assets (equipment) in this location and all its descendants.
                                    Only present when `with_assets_count=true` query parameter is provided.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                associations:
                                  description: >
                                    List of ways the operator is associated with this building. Possible values are
                                    `DIRECT` (via a direct local-operator assignment), `TEAM` (via a team the operator
                                    belongs to), and `CLIENT` (via a client the operator is assigned to).
                                  type: array
                                  items:
                                    type: string
                                    enum:
                                      - DIRECT
                                      - TEAM
                                      - CLIENT
                              required:
                                - name
                                - full_name
                                - code
                                - full_code
                                - observation
                                - date_updated
                            relationships:
                              type: object
                              properties:
                                building:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - building
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                files:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - file
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                operators:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - operator
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                localOrientation:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - localOrientation
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                          required:
                            - id
                            - type
                            - attributes
                        - title: Operator
                          description: Operator model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Operator
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - operator
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                operator_id:
                                  description: ID of the Operator
                                  type: integer
                                  readOnly: true
                                operator_uuid:
                                  description: Uuid of the Operator
                                  type: string
                                  format: uuid
                                  readOnly: true
                                full_name:
                                  type: string
                                email:
                                  type: string
                                  format: email
                                phone:
                                  type:
                                    - string
                                    - 'null'
                                cellphone:
                                  type:
                                    - string
                                    - 'null'
                                account:
                                  description: Type of account which determines the access permission level.
                                  type: string
                                  enum:
                                    - admin
                                    - manager
                                    - technician
                                    - operator
                                    - reporter
                                language:
                                  type: string
                                  enum:
                                    - ar
                                    - ca
                                    - da_dk
                                    - en
                                    - es
                                    - fr_fr
                                    - pl_pl
                                    - pt_br
                                    - pt_pt
                                    - ko
                                    - zh_cn
                                    - nl_nl
                                    - de_de
                                cost_per_hour:
                                  type: number
                                  minimum: 0
                                  examples:
                                    - 10
                                warehouse_id:
                                  description: ID of the warehouse associated to the Operator by default.
                                  type: integer
                                entity_id:
                                  type: integer
                                  readOnly: true
                                timezone:
                                  description: >
                                    Valid PHP timezone identifier. See the full list here:
                                    https://www.php.net/manual/en/timezones.php.
                                  type: string
                                  examples:
                                    - Europe/Lisbon
                                is_from_network:
                                  type: boolean
                                created_at:
                                  type: string
                                  format: date-time
                                phone_country_code:
                                  type: string
                                  examples:
                                    - US
                                is_first_web_login:
                                  type:
                                    - boolean
                                    - 'null'
                                  readOnly: true
                                status:
                                  type: string
                                  enum:
                                    - WORKING
                                    - AVAILABLE
                                    - OFFLINE
                                  examples:
                                    - WORKING
                            meta:
                              type: object
                              properties:
                                custom_fields:
                                  type:
                                    - object
                                    - 'null'
                                  additionalProperties:
                                    oneOf:
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - SELECT
                                            examples:
                                              - SELECT
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                option_id:
                                                  description: The ID of the selected option
                                                  type: integer
                                                  examples:
                                                    - 123
                                                option_code:
                                                  description: The code of the selected option
                                                  type:
                                                    - string
                                                    - 'null'
                                                  examples:
                                                    - OP01
                                                value:
                                                  description: The value of the selected option
                                                  type: string
                                                  examples:
                                                    - My Option 1
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field supports selecting multiple values
                                                    type: boolean
                                                    examples:
                                                      - true
                                                  managed_by_integrations:
                                                    description: >-
                                                      Indicates if the Custom Field options are only managed by
                                                      integrations
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - TEXT
                                            examples:
                                              - TEXT
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            examples:
                                              - abc
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (Empty for Custom Fields of
                                                  type TEXT)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - BOOLEAN
                                            examples:
                                              - BOOLEAN
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - boolean
                                              - 'null'
                                            examples:
                                              - true
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (There are none for the Custom
                                                  Field Boolean type)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - RELATIONSHIP
                                            examples:
                                              - RELATIONSHIP
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                related_to_type:
                                                  description: The type of object that is selected as the Custom Field Values
                                                  type: string
                                                  enum:
                                                    - CLIENT
                                                    - CONTACT
                                                  examples:
                                                    - CLIENT
                                                related_to_id:
                                                  description: The ID of object that is selected as the Custom Field Value
                                                  type: integer
                                                  examples:
                                                    - 123
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field allows multiple selection
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  relationship_object:
                                                    description: The type of object that is selected as the Custom Field Values
                                                    type: string
                                                    enum:
                                                      - CLIENT
                                                      - CONTACT
                                                    examples:
                                                      - CLIENT
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - DATETIME
                                            examples:
                                              - DATETIME
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-12-12 12:39:00'
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_past_dates:
                                                    description: Indicates if this Custom Field support past dates
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  allow_future_dates:
                                                    description: Indicates if this Custom Field support future dates
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - NUMBER
                                            examples:
                                              - NUMBER
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - integer
                                              - 'null'
                                            examples:
                                              - 12
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  min:
                                                    description: Indicates the minimum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 1
                                                  max:
                                                    description: Indicates the maximum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 3
                                    discriminator:
                                      propertyName: field_type
                    uniqueItems: true
                  meta:
                    title: Meta
                    description: Meta model structure details
                    type: object
                    properties:
                      pagination:
                        type: object
                        properties:
                          total:
                            description: Total items.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          count:
                            description: Total items returned for the current page.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          per_page:
                            description: Maximum number of records per page.
                            type: integer
                            minimum: 1
                            default: 200
                            examples:
                              - 1
                          current_page:
                            description: Number of the current page.
                            type: integer
                            minimum: 1
                            default: 1
                          total_pages:
                            description: Number of the total pages.
                            type: integer
                            minimum: 1
                            default: 1
                        required:
                          - total
                          - count
                          - per_page
                          - current_page
                          - total_pages
                  links:
                    title: Response Links on listing operations
                    description: >-
                      Requests that return multiple items include a `links` attribute, with links related to request's
                      context.
                    type: object
                    properties:
                      self:
                        description: Current response link.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      first:
                        description: Link to the first page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      last:
                        description: Link to the previous page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      next:
                        description: Link to the next page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                    required:
                      - self
                      - first
                      - last
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
    post:
      operationId: createFailure
      tags:
        - Failures
      summary: Create a Failure
      description: >
        This endpoint allows you to create a Failure.


        - `problem_id`: refers to the type of problem. First, you need to retrieve the **problem areas** (GET
        `/problems`). Then, list the sub-problems from the desired area (GET `/problems/{problem_id}/subproblems`) and,
        from the response, use the respective `problem_id`.

        - `local_id`: refers to the location (GET `/locations`) related to the Failure. It can't be of type "building"
        neither "location-folder", this is, only of type "location".
      requestBody:
        content:
          application/json:
            schema:
              description: Failure payload
              type: object
              properties:
                problem_id:
                  description: >
                    ID of the associated problem. Refers to the type of Problem and need to be a Problem Type, not a
                    Problem Area. To get the Problem Types, first, you need to retrieve the Problem Areas (GET
                    `/problems`). Then, list the Problem Types from the desired area (GET
                    `/problems/{problem_id}/subproblems`) and, from the response, use the respective `problem_id`.
                  type: integer
                description:
                  description: A more detailed description of the reported incident.
                  type: string
                  examples:
                    - The bathroom light needs replacement
                observations:
                  description: A longer description or anything with longer text that needs to be reported.
                  type: string
                priority:
                  description: Failure priority number, being 1 the lowest priority and 4 the highest priority.
                  type: integer
                  enum:
                    - 1
                    - 2
                    - 3
                    - 4
                client_id:
                  description: ID of the client associated to the Failure
                  type: integer
                local_id:
                  description: ID of the location associated to the Failure
                  type: integer
                operator_id:
                  description: >-
                    ID of the operator that owns the Failure. By default, uses the ID of the Operator associated to the
                    API token.
                  type: integer
                  writeOnly: true
                report_type:
                  description: Type of the Failure's reporter. The failure can be reported by an Operator or by a Contact.
                  type: string
                  enum:
                    - contact
                    - operator
                report_id:
                  description: ID of the operator or contact who reported the Failure
                  type: integer
                  writeOnly: true
                supplier_id:
                  description: ID of the supplier associated to the Failure
                  type: integer
                gatekeeper_id:
                  description: ID for the associated Gatekeeper
                  type: integer
                cost_center_id:
                  description: ID of the associated CostCenter
                  type: integer
                include_automatic_assignees:
                  description: If is to append automatic assignees when a user select a custom list of assignees
                  type: boolean
              required:
                - client_id
                - problem_id
                - priority
                - local_id
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: Failure
                    description: Failure model structure details
                    type: object
                    properties:
                      id:
                        description: ID of the Failure
                        type: string
                        readOnly: true
                      type:
                        description: Model type
                        type: string
                        enum:
                          - failure
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          failure_id:
                            description: ID of the Failure
                            type: integer
                            readOnly: true
                            examples:
                              - 1
                          uuid:
                            description: Universally Unique Identifier for the Failure
                            type: string
                            format: uuid
                            readOnly: true
                          problem_id:
                            description: ID of the associated problem
                            type: integer
                          status:
                            type: string
                            enum:
                              - WAITING_APPROVAL
                              - WAITING_RESOLUTION
                              - IN_RESOLUTION
                              - PAUSED
                              - COMPLETED
                              - ARCHIVED
                            readOnly: true
                          start_date:
                            type: string
                            format: date-time
                            readOnly: true
                            examples:
                              - '2020-08-28T08:48:00.000Z'
                          completed_date:
                            type:
                              - string
                              - 'null'
                            format: date-time
                            readOnly: true
                            examples:
                              - '2020-08-28T17:12:00.000Z'
                          approved_date:
                            type:
                              - string
                              - 'null'
                            format: date-time
                            readOnly: true
                            examples:
                              - '2020-08-28T09:30:00.000Z'
                          paused_date:
                            type:
                              - string
                              - 'null'
                            format: date-time
                            readOnly: true
                            examples:
                              - '2020-08-28T13:05:00.000Z'
                          description:
                            type: string
                            examples:
                              - Needs replacement
                          last_status_description:
                            type: string
                            examples:
                              - Completed
                          observations:
                            type:
                              - string
                              - 'null'
                            examples:
                              - Needs a new part
                          code:
                            type: string
                            examples:
                              - WO2022
                          fts_vector:
                            description: Denormalized data of a Failure
                            type: string
                          priority:
                            description: Failure priority number being 1 the lowest priority and 4 the highest priority.
                            type: integer
                            enum:
                              - 1
                              - 2
                              - 3
                              - 4
                          client_id:
                            description: ID of the associated client defined according to the respective `local_id`.
                            type: integer
                            readOnly: true
                          entity_id:
                            description: ID of the Entity of the Failure
                            type: integer
                            readOnly: true
                          metering_registry_id:
                            description: ID of a possible associated metering registry
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          local_id:
                            description: ID of the location associated to the Failure
                            type: integer
                          paused_reason_id:
                            description: ID of the paused reason associated to the Failure
                            type: integer
                          external_id:
                            description: External ID to be associated to the Failure
                            type:
                              - string
                              - 'null'
                          report_name:
                            description: Name of who reported the Failure
                            type: string
                          solved:
                            description: Indicates whether the Failure was closed successfully or not
                            type: boolean
                            readOnly: true
                            default: false
                          confirmed:
                            description: Indicates whether the Failure is confirmed or not
                            type: boolean
                            readOnly: true
                            default: false
                          started:
                            description: Indicates whether the Failure is started or not
                            type: boolean
                            readOnly: true
                            default: false
                          paused:
                            description: Indicates whether the Failure is paused or not
                            type: boolean
                            readOnly: true
                            default: false
                          completed:
                            description: Indicates whether the Failure is completed or not
                            type: boolean
                            readOnly: true
                            default: false
                          archived:
                            description: Indicates whether the Failure is archived or not
                            type: boolean
                            readOnly: true
                            default: false
                          approved:
                            description: Indicates whether the Failure is approved or not
                            type: boolean
                            readOnly: true
                            default: false
                          next_schedule:
                            type:
                              - string
                              - 'null'
                            format: date-time
                            readOnly: true
                            examples:
                              - '2020-08-29T10:30:00.000Z'
                          message_count:
                            type: integer
                            minimum: 0
                            default: 0
                            examples:
                              - 3
                          time_statistics:
                            type: object
                            properties:
                              approved_date:
                                type:
                                  - string
                                  - 'null'
                                format: date-time
                                readOnly: true
                                examples:
                                  - '2020-08-28T09:30:00.000Z'
                              last_completed_date:
                                type:
                                  - string
                                  - 'null'
                                format: date-time
                                readOnly: true
                                examples:
                                  - '2020-08-28T17:12:00.000Z'
                              last_paused_date:
                                type:
                                  - string
                                  - 'null'
                                format: date-time
                                readOnly: true
                                examples:
                                  - '2020-08-28T13:05:00.000Z'
                              started_date:
                                type:
                                  - string
                                  - 'null'
                                format: date-time
                                readOnly: true
                                examples:
                                  - '2020-08-28T09:45:00.000Z'
                              time_to_approve:
                                description: Duration it took to approve the Failure since reported in `ISO8601` format.
                                type:
                                  - string
                                  - 'null'
                                readOnly: true
                                examples:
                                  - P0Y0M0DT0H42M0S
                              time_to_complete:
                                description: Duration it took to complete the Failure since reported in `ISO8601` format.
                                type:
                                  - string
                                  - 'null'
                                readOnly: true
                                examples:
                                  - P0Y0M0DT8H24M0S
                              time_to_complete_after_started:
                                description: >-
                                  Duration it took to complete the Failure since the resolution started in `ISO8601`
                                  format.
                                type:
                                  - string
                                  - 'null'
                                readOnly: true
                                examples:
                                  - P0Y0M0DT7H27M0S
                              time_to_start:
                                description: Duration it took to start the Failure's resolution since reported in `ISO8601` format.
                                type:
                                  - string
                                  - 'null'
                                readOnly: true
                                examples:
                                  - P0Y0M0DT0H57M0S
                              time_to_start_after_approved:
                                description: Duration it took to start the Failure's resolution since approved in `ISO8601` format.
                                type:
                                  - string
                                  - 'null'
                                readOnly: true
                                examples:
                                  - P0Y0M0DT0H15M0S
                              real_duration:
                                description: Real duration of the Failure's resolution time in `ISO8601` format.
                                type:
                                  - string
                                  - 'null'
                                readOnly: true
                                examples:
                                  - P0Y0M0DT7H27M0S
                          supplier_id:
                            description: ID of the supplier associated to the Failure
                            type: integer
                          signature_status:
                            description: Indicates whether the Failure is signed or not
                            type: string
                            enum:
                              - SIGNED
                              - NOT_SIGNED
                            default: NOT_SIGNED
                          last_status_change_date:
                            type: string
                            format: date-time
                            readOnly: true
                            examples:
                              - '2020-08-28T09:30:00.000Z'
                          approved_by_id:
                            description: ID of the operator who approved the Failure.
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          completed_by_id:
                            description: ID of the operator who completed the Failure.
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          started_by_id:
                            description: ID of the operator who started the Failure's resolution.
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          paused_by_id:
                            description: ID of the operator who paused the Failure's resolution.
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          approved_by:
                            description: Name of the operator who approved the Failure.
                            type:
                              - string
                              - 'null'
                            readOnly: true
                          completed_by:
                            description: Name of the operator who completed the Failure.
                            type:
                              - string
                              - 'null'
                            readOnly: true
                          started_by:
                            description: Name of the operator who started the Failure's resolution.
                            type:
                              - string
                              - 'null'
                            readOnly: true
                          paused_by:
                            description: Name of the operator who paused the Failure's resolution.
                            type:
                              - string
                              - 'null'
                            readOnly: true
                          reported_by:
                            description: Name of the operator who reported the Failure.
                            type:
                              - string
                              - 'null'
                            readOnly: true
                          manpower_duration:
                            description: Duration of the Failure's manpower time in `ISO8601` format.
                            type:
                              - string
                              - 'null'
                            readOnly: true
                            examples:
                              - P0Y0M0DT7H27M0S
                          cost_center_id:
                            description: ID of the cost center associated to the Failure
                            type:
                              - integer
                              - 'null'
                          network_failure_id:
                            description: ID of the Network Failure
                            type: integer
                            readOnly: true
                            examples:
                              - 1
                          created_at:
                            type: string
                            format: date-time
                            readOnly: true
                          updated_at:
                            type: string
                            format: date-time
                            readOnly: true
                          date_deleted:
                            type: string
                            format: date-time
                            readOnly: true
                      relationships:
                        type: object
                        properties:
                          approvedBy:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - operator
                                    readOnly: true
                                  id:
                                    type: string
                                    readOnly: true
                          completedBy:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - operator
                                    readOnly: true
                                  id:
                                    type: string
                                    readOnly: true
                          createdBy:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - operator
                                    readOnly: true
                                  id:
                                    type: string
                                    readOnly: true
                          files:
                            type: object
                            properties:
                              data:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - file
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                          location:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - location
                                    readOnly: true
                                  id:
                                    type: string
                                    readOnly: true
                          operator:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - operator
                                    readOnly: true
                                  id:
                                    type: string
                                    readOnly: true
                    required:
                      - id
                      - type
                      - attributes
              examples:
                Example:
                  value:
                    data:
                      type: failure
                      id: '999'
                      attributes:
                        failure_id: 999
                        problem_id: 999
                        problem_name: Electricity - Short Circuit
                        status: COMPLETED
                        state: COMPLETED_CONFIRMED
                        report_date: '2020-08-28 08:48:00'
                        completed_date: '2020-08-28 17:12:00'
                        approved_date: '2020-08-28 09:30:00'
                        paused_date: '2020-08-28 13:05:00'
                        description: Needs replacement
                        state_description: Closed
                        observations: The short circuit occurred after plug the hair dryer
                        entity_id: 12
                        priority: 1
                        priority_text: URGENT
                        client_id: 999
                        client_code: JDC
                        client_name: John Doe Co.
                        local_id: 999
                        local_code: MB.1.MR
                        local_name: Main Building - 1st Floor - Main room
                        root_local_id: 999
                        solved: true
                        confirmed: false
                        next_schedule: '2020-08-29 10:30:00'
                        message_count: 3
                        time_statistics:
                          approved_date: '2020-08-28 09:30:00'
                          last_completed_date: '2020-08-28 17:12:00'
                          last_paused_date: '2020-08-28 13:05:00'
                          last_paused_description: Waiting for materials
                          started_date: '2020-08-28 09:45:00'
                          time_to_approve: P0Y0M0DT0H42M0S
                          time_to_complete: P0Y0M0DT8H24M0S
                          time_to_complete_after_started: P0Y0M0DT7H27M0S
                          time_to_start: P0Y0M0DT0H57M0S
                          time_to_start_after_approved: P0Y0M0DT0H15M0S
                          real_duration: P0Y0M0DT7H27M0S
                        supplier_id: 999
                        signature_status: NOT_SIGNED
                        last_status_change_date: '2020-08-28 09:30:00'
                        next_sla_percentage: '75.29520563697858'
                        approved_by_id: 999
                        completed_by_id: 999
                        reported_by_id: 999
                        started_by_id: 999
                        manpower_duration: P0Y0M0DT7H27M0S
                        manpower_cost: '0.01'
                        started_date: '2020-08-28 09:45:00'
                        next_sla_date: '2020-08-28 09:30:00'
                        failure_priority_id: 202
                        created_at: '2024-07-09 22:27:21'
                        updated_at: '2025-05-23 15:47:47'
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '403':
          description: Forbidden. The action can not be fulfilled.
          content:
            application/json:
              schema:
                title: 403 Forbidden
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 403
                      message:
                        type: string
                        examples:
                          - Action unauthorized
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 403
                      message: Action unauthorized
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /failures/{failure}:
    get:
      operationId: getFailure
      tags:
        - Failures
      summary: Get a Failure
      description: This endpoint allows you to get a specific Failure.
      parameters:
        - name: failure
          in: path
          description: The Failure ID
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: Failure
                    description: Failure model structure details
                    type: object
                    properties:
                      id:
                        description: ID of the Failure
                        type: string
                        readOnly: true
                      type:
                        description: Model type
                        type: string
                        enum:
                          - failure
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          failure_id:
                            description: ID of the Failure
                            type: integer
                            readOnly: true
                            examples:
                              - 1
                          uuid:
                            description: Universally Unique Identifier for the Failure
                            type: string
                            format: uuid
                            readOnly: true
                          problem_id:
                            description: ID of the associated problem
                            type: integer
                          status:
                            type: string
                            enum:
                              - WAITING_APPROVAL
                              - WAITING_RESOLUTION
                              - IN_RESOLUTION
                              - PAUSED
                              - COMPLETED
                              - ARCHIVED
                            readOnly: true
                          start_date:
                            type: string
                            format: date-time
                            readOnly: true
                            examples:
                              - '2020-08-28T08:48:00.000Z'
                          completed_date:
                            type:
                              - string
                              - 'null'
                            format: date-time
                            readOnly: true
                            examples:
                              - '2020-08-28T17:12:00.000Z'
                          approved_date:
                            type:
                              - string
                              - 'null'
                            format: date-time
                            readOnly: true
                            examples:
                              - '2020-08-28T09:30:00.000Z'
                          paused_date:
                            type:
                              - string
                              - 'null'
                            format: date-time
                            readOnly: true
                            examples:
                              - '2020-08-28T13:05:00.000Z'
                          description:
                            type: string
                            examples:
                              - Needs replacement
                          last_status_description:
                            type: string
                            examples:
                              - Completed
                          observations:
                            type:
                              - string
                              - 'null'
                            examples:
                              - Needs a new part
                          code:
                            type: string
                            examples:
                              - WO2022
                          fts_vector:
                            description: Denormalized data of a Failure
                            type: string
                          priority:
                            description: Failure priority number being 1 the lowest priority and 4 the highest priority.
                            type: integer
                            enum:
                              - 1
                              - 2
                              - 3
                              - 4
                          client_id:
                            description: ID of the associated client defined according to the respective `local_id`.
                            type: integer
                            readOnly: true
                          entity_id:
                            description: ID of the Entity of the Failure
                            type: integer
                            readOnly: true
                          metering_registry_id:
                            description: ID of a possible associated metering registry
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          local_id:
                            description: ID of the location associated to the Failure
                            type: integer
                          paused_reason_id:
                            description: ID of the paused reason associated to the Failure
                            type: integer
                          external_id:
                            description: External ID to be associated to the Failure
                            type:
                              - string
                              - 'null'
                          report_name:
                            description: Name of who reported the Failure
                            type: string
                          solved:
                            description: Indicates whether the Failure was closed successfully or not
                            type: boolean
                            readOnly: true
                            default: false
                          confirmed:
                            description: Indicates whether the Failure is confirmed or not
                            type: boolean
                            readOnly: true
                            default: false
                          started:
                            description: Indicates whether the Failure is started or not
                            type: boolean
                            readOnly: true
                            default: false
                          paused:
                            description: Indicates whether the Failure is paused or not
                            type: boolean
                            readOnly: true
                            default: false
                          completed:
                            description: Indicates whether the Failure is completed or not
                            type: boolean
                            readOnly: true
                            default: false
                          archived:
                            description: Indicates whether the Failure is archived or not
                            type: boolean
                            readOnly: true
                            default: false
                          approved:
                            description: Indicates whether the Failure is approved or not
                            type: boolean
                            readOnly: true
                            default: false
                          next_schedule:
                            type:
                              - string
                              - 'null'
                            format: date-time
                            readOnly: true
                            examples:
                              - '2020-08-29T10:30:00.000Z'
                          message_count:
                            type: integer
                            minimum: 0
                            default: 0
                            examples:
                              - 3
                          time_statistics:
                            type: object
                            properties:
                              approved_date:
                                type:
                                  - string
                                  - 'null'
                                format: date-time
                                readOnly: true
                                examples:
                                  - '2020-08-28T09:30:00.000Z'
                              last_completed_date:
                                type:
                                  - string
                                  - 'null'
                                format: date-time
                                readOnly: true
                                examples:
                                  - '2020-08-28T17:12:00.000Z'
                              last_paused_date:
                                type:
                                  - string
                                  - 'null'
                                format: date-time
                                readOnly: true
                                examples:
                                  - '2020-08-28T13:05:00.000Z'
                              started_date:
                                type:
                                  - string
                                  - 'null'
                                format: date-time
                                readOnly: true
                                examples:
                                  - '2020-08-28T09:45:00.000Z'
                              time_to_approve:
                                description: Duration it took to approve the Failure since reported in `ISO8601` format.
                                type:
                                  - string
                                  - 'null'
                                readOnly: true
                                examples:
                                  - P0Y0M0DT0H42M0S
                              time_to_complete:
                                description: Duration it took to complete the Failure since reported in `ISO8601` format.
                                type:
                                  - string
                                  - 'null'
                                readOnly: true
                                examples:
                                  - P0Y0M0DT8H24M0S
                              time_to_complete_after_started:
                                description: >-
                                  Duration it took to complete the Failure since the resolution started in `ISO8601`
                                  format.
                                type:
                                  - string
                                  - 'null'
                                readOnly: true
                                examples:
                                  - P0Y0M0DT7H27M0S
                              time_to_start:
                                description: Duration it took to start the Failure's resolution since reported in `ISO8601` format.
                                type:
                                  - string
                                  - 'null'
                                readOnly: true
                                examples:
                                  - P0Y0M0DT0H57M0S
                              time_to_start_after_approved:
                                description: Duration it took to start the Failure's resolution since approved in `ISO8601` format.
                                type:
                                  - string
                                  - 'null'
                                readOnly: true
                                examples:
                                  - P0Y0M0DT0H15M0S
                              real_duration:
                                description: Real duration of the Failure's resolution time in `ISO8601` format.
                                type:
                                  - string
                                  - 'null'
                                readOnly: true
                                examples:
                                  - P0Y0M0DT7H27M0S
                          supplier_id:
                            description: ID of the supplier associated to the Failure
                            type: integer
                          signature_status:
                            description: Indicates whether the Failure is signed or not
                            type: string
                            enum:
                              - SIGNED
                              - NOT_SIGNED
                            default: NOT_SIGNED
                          last_status_change_date:
                            type: string
                            format: date-time
                            readOnly: true
                            examples:
                              - '2020-08-28T09:30:00.000Z'
                          approved_by_id:
                            description: ID of the operator who approved the Failure.
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          completed_by_id:
                            description: ID of the operator who completed the Failure.
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          started_by_id:
                            description: ID of the operator who started the Failure's resolution.
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          paused_by_id:
                            description: ID of the operator who paused the Failure's resolution.
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          approved_by:
                            description: Name of the operator who approved the Failure.
                            type:
                              - string
                              - 'null'
                            readOnly: true
                          completed_by:
                            description: Name of the operator who completed the Failure.
                            type:
                              - string
                              - 'null'
                            readOnly: true
                          started_by:
                            description: Name of the operator who started the Failure's resolution.
                            type:
                              - string
                              - 'null'
                            readOnly: true
                          paused_by:
                            description: Name of the operator who paused the Failure's resolution.
                            type:
                              - string
                              - 'null'
                            readOnly: true
                          reported_by:
                            description: Name of the operator who reported the Failure.
                            type:
                              - string
                              - 'null'
                            readOnly: true
                          manpower_duration:
                            description: Duration of the Failure's manpower time in `ISO8601` format.
                            type:
                              - string
                              - 'null'
                            readOnly: true
                            examples:
                              - P0Y0M0DT7H27M0S
                          cost_center_id:
                            description: ID of the cost center associated to the Failure
                            type:
                              - integer
                              - 'null'
                          network_failure_id:
                            description: ID of the Network Failure
                            type: integer
                            readOnly: true
                            examples:
                              - 1
                          created_at:
                            type: string
                            format: date-time
                            readOnly: true
                          updated_at:
                            type: string
                            format: date-time
                            readOnly: true
                          date_deleted:
                            type: string
                            format: date-time
                            readOnly: true
                      relationships:
                        type: object
                        properties:
                          approvedBy:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - operator
                                    readOnly: true
                                  id:
                                    type: string
                                    readOnly: true
                          completedBy:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - operator
                                    readOnly: true
                                  id:
                                    type: string
                                    readOnly: true
                          createdBy:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - operator
                                    readOnly: true
                                  id:
                                    type: string
                                    readOnly: true
                          files:
                            type: object
                            properties:
                              data:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - file
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                          location:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - location
                                    readOnly: true
                                  id:
                                    type: string
                                    readOnly: true
                          operator:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - operator
                                    readOnly: true
                                  id:
                                    type: string
                                    readOnly: true
                    required:
                      - id
                      - type
                      - attributes
              examples:
                Example:
                  value:
                    data:
                      type: failure
                      id: '999'
                      attributes:
                        failure_id: 999
                        problem_id: 999
                        problem_name: Electricity - Short Circuit
                        status: COMPLETED
                        state: COMPLETED_CONFIRMED
                        report_date: '2020-08-28 08:48:00'
                        completed_date: '2020-08-28 17:12:00'
                        approved_date: '2020-08-28 09:30:00'
                        paused_date: '2020-08-28 13:05:00'
                        description: Needs replacement
                        state_description: Closed
                        observations: The short circuit occurred after plug the hair dryer
                        entity_id: 12
                        priority: 1
                        priority_text: URGENT
                        client_id: 999
                        client_code: JDC
                        client_name: John Doe Co.
                        local_id: 999
                        local_code: MB.1.MR
                        local_name: Main Building - 1st Floor - Main room
                        root_local_id: 999
                        solved: true
                        confirmed: false
                        next_schedule: '2020-08-29 10:30:00'
                        message_count: 3
                        time_statistics:
                          approved_date: '2020-08-28 09:30:00'
                          last_completed_date: '2020-08-28 17:12:00'
                          last_paused_date: '2020-08-28 13:05:00'
                          last_paused_description: Waiting for materials
                          started_date: '2020-08-28 09:45:00'
                          time_to_approve: P0Y0M0DT0H42M0S
                          time_to_complete: P0Y0M0DT8H24M0S
                          time_to_complete_after_started: P0Y0M0DT7H27M0S
                          time_to_start: P0Y0M0DT0H57M0S
                          time_to_start_after_approved: P0Y0M0DT0H15M0S
                          real_duration: P0Y0M0DT7H27M0S
                        supplier_id: 999
                        signature_status: NOT_SIGNED
                        last_status_change_date: '2020-08-28 09:30:00'
                        next_sla_percentage: '75.29520563697858'
                        approved_by_id: 999
                        completed_by_id: 999
                        reported_by_id: 999
                        started_by_id: 999
                        manpower_duration: P0Y0M0DT7H27M0S
                        manpower_cost: '0.01'
                        started_date: '2020-08-28 09:45:00'
                        next_sla_date: '2020-08-28 09:30:00'
                        failure_priority_id: 202
                        created_at: '2024-07-09 22:27:21'
                        updated_at: '2025-05-23 15:47:47'
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
    delete:
      operationId: deleteFailure
      tags:
        - Failures
      summary: Delete Failure
      description: This endpoint allows you to delete a Failure
      parameters:
        - name: failure
          in: path
          description: The Failure ID
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items: {}
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
      x-toolbox: true
    patch:
      operationId: updateFailure
      tags:
        - Failures
      summary: Update Failure
      description: This endpoint allows you to update a Failure
      parameters:
        - name: failure
          in: path
          description: The Failure ID
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              description: Failure payload
              type: object
              properties:
                problem_id:
                  description: >
                    ID of the associated problem. Refers to the type of Problem and need to be a Problem Type, not a
                    Problem Area. To get the Problem Types, first, you need to retrieve the Problem Areas (GET
                    `/problems`). Then, list the Problem Types from the desired area (GET
                    `/problems/{problem_id}/subproblems`) and, from the response, use the respective `problem_id`.
                  type: integer
                description:
                  description: A more detailed description of the reported incident.
                  type: string
                  examples:
                    - The bathroom light needs replacement
                observations:
                  description: A longer description or anything with longer text that needs to be reported.
                  type: string
                priority:
                  description: Failure priority number, being 1 the lowest priority and 4 the highest priority.
                  type: integer
                  enum:
                    - 1
                    - 2
                    - 3
                    - 4
                client_id:
                  description: ID of the client associated to the Failure
                  type: integer
                local_id:
                  description: ID of the location associated to the Failure
                  type: integer
                supplier_id:
                  description: ID of the supplier associated to the Failure
                  type: integer
                cost_center_id:
                  description: ID of the associated CostCenter
                  type: integer
                gatekeeper_id:
                  description: ID for the associated Gatekeeper
                  type: integer
                gatekeeper_notification:
                  description: A set of notifications IDs to be dispatched under Gatekeeper.
                  type: array
                  items:
                    type: integer
                last_status_description:
                  description: Observation for closing Failure action
                  type: string
                external_id:
                  description: Id of the failure in the external system
                  type: string
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: Failure
                    description: Failure model structure details
                    type: object
                    properties:
                      id:
                        description: ID of the Failure
                        type: string
                        readOnly: true
                      type:
                        description: Model type
                        type: string
                        enum:
                          - failure
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          failure_id:
                            description: ID of the Failure
                            type: integer
                            readOnly: true
                            examples:
                              - 1
                          uuid:
                            description: Universally Unique Identifier for the Failure
                            type: string
                            format: uuid
                            readOnly: true
                          problem_id:
                            description: ID of the associated problem
                            type: integer
                          status:
                            type: string
                            enum:
                              - WAITING_APPROVAL
                              - WAITING_RESOLUTION
                              - IN_RESOLUTION
                              - PAUSED
                              - COMPLETED
                              - ARCHIVED
                            readOnly: true
                          start_date:
                            type: string
                            format: date-time
                            readOnly: true
                            examples:
                              - '2020-08-28T08:48:00.000Z'
                          completed_date:
                            type:
                              - string
                              - 'null'
                            format: date-time
                            readOnly: true
                            examples:
                              - '2020-08-28T17:12:00.000Z'
                          approved_date:
                            type:
                              - string
                              - 'null'
                            format: date-time
                            readOnly: true
                            examples:
                              - '2020-08-28T09:30:00.000Z'
                          paused_date:
                            type:
                              - string
                              - 'null'
                            format: date-time
                            readOnly: true
                            examples:
                              - '2020-08-28T13:05:00.000Z'
                          description:
                            type: string
                            examples:
                              - Needs replacement
                          last_status_description:
                            type: string
                            examples:
                              - Completed
                          observations:
                            type:
                              - string
                              - 'null'
                            examples:
                              - Needs a new part
                          code:
                            type: string
                            examples:
                              - WO2022
                          fts_vector:
                            description: Denormalized data of a Failure
                            type: string
                          priority:
                            description: Failure priority number being 1 the lowest priority and 4 the highest priority.
                            type: integer
                            enum:
                              - 1
                              - 2
                              - 3
                              - 4
                          client_id:
                            description: ID of the associated client defined according to the respective `local_id`.
                            type: integer
                            readOnly: true
                          entity_id:
                            description: ID of the Entity of the Failure
                            type: integer
                            readOnly: true
                          metering_registry_id:
                            description: ID of a possible associated metering registry
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          local_id:
                            description: ID of the location associated to the Failure
                            type: integer
                          paused_reason_id:
                            description: ID of the paused reason associated to the Failure
                            type: integer
                          external_id:
                            description: External ID to be associated to the Failure
                            type:
                              - string
                              - 'null'
                          report_name:
                            description: Name of who reported the Failure
                            type: string
                          solved:
                            description: Indicates whether the Failure was closed successfully or not
                            type: boolean
                            readOnly: true
                            default: false
                          confirmed:
                            description: Indicates whether the Failure is confirmed or not
                            type: boolean
                            readOnly: true
                            default: false
                          started:
                            description: Indicates whether the Failure is started or not
                            type: boolean
                            readOnly: true
                            default: false
                          paused:
                            description: Indicates whether the Failure is paused or not
                            type: boolean
                            readOnly: true
                            default: false
                          completed:
                            description: Indicates whether the Failure is completed or not
                            type: boolean
                            readOnly: true
                            default: false
                          archived:
                            description: Indicates whether the Failure is archived or not
                            type: boolean
                            readOnly: true
                            default: false
                          approved:
                            description: Indicates whether the Failure is approved or not
                            type: boolean
                            readOnly: true
                            default: false
                          next_schedule:
                            type:
                              - string
                              - 'null'
                            format: date-time
                            readOnly: true
                            examples:
                              - '2020-08-29T10:30:00.000Z'
                          message_count:
                            type: integer
                            minimum: 0
                            default: 0
                            examples:
                              - 3
                          time_statistics:
                            type: object
                            properties:
                              approved_date:
                                type:
                                  - string
                                  - 'null'
                                format: date-time
                                readOnly: true
                                examples:
                                  - '2020-08-28T09:30:00.000Z'
                              last_completed_date:
                                type:
                                  - string
                                  - 'null'
                                format: date-time
                                readOnly: true
                                examples:
                                  - '2020-08-28T17:12:00.000Z'
                              last_paused_date:
                                type:
                                  - string
                                  - 'null'
                                format: date-time
                                readOnly: true
                                examples:
                                  - '2020-08-28T13:05:00.000Z'
                              started_date:
                                type:
                                  - string
                                  - 'null'
                                format: date-time
                                readOnly: true
                                examples:
                                  - '2020-08-28T09:45:00.000Z'
                              time_to_approve:
                                description: Duration it took to approve the Failure since reported in `ISO8601` format.
                                type:
                                  - string
                                  - 'null'
                                readOnly: true
                                examples:
                                  - P0Y0M0DT0H42M0S
                              time_to_complete:
                                description: Duration it took to complete the Failure since reported in `ISO8601` format.
                                type:
                                  - string
                                  - 'null'
                                readOnly: true
                                examples:
                                  - P0Y0M0DT8H24M0S
                              time_to_complete_after_started:
                                description: >-
                                  Duration it took to complete the Failure since the resolution started in `ISO8601`
                                  format.
                                type:
                                  - string
                                  - 'null'
                                readOnly: true
                                examples:
                                  - P0Y0M0DT7H27M0S
                              time_to_start:
                                description: Duration it took to start the Failure's resolution since reported in `ISO8601` format.
                                type:
                                  - string
                                  - 'null'
                                readOnly: true
                                examples:
                                  - P0Y0M0DT0H57M0S
                              time_to_start_after_approved:
                                description: Duration it took to start the Failure's resolution since approved in `ISO8601` format.
                                type:
                                  - string
                                  - 'null'
                                readOnly: true
                                examples:
                                  - P0Y0M0DT0H15M0S
                              real_duration:
                                description: Real duration of the Failure's resolution time in `ISO8601` format.
                                type:
                                  - string
                                  - 'null'
                                readOnly: true
                                examples:
                                  - P0Y0M0DT7H27M0S
                          supplier_id:
                            description: ID of the supplier associated to the Failure
                            type: integer
                          signature_status:
                            description: Indicates whether the Failure is signed or not
                            type: string
                            enum:
                              - SIGNED
                              - NOT_SIGNED
                            default: NOT_SIGNED
                          last_status_change_date:
                            type: string
                            format: date-time
                            readOnly: true
                            examples:
                              - '2020-08-28T09:30:00.000Z'
                          approved_by_id:
                            description: ID of the operator who approved the Failure.
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          completed_by_id:
                            description: ID of the operator who completed the Failure.
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          started_by_id:
                            description: ID of the operator who started the Failure's resolution.
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          paused_by_id:
                            description: ID of the operator who paused the Failure's resolution.
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          approved_by:
                            description: Name of the operator who approved the Failure.
                            type:
                              - string
                              - 'null'
                            readOnly: true
                          completed_by:
                            description: Name of the operator who completed the Failure.
                            type:
                              - string
                              - 'null'
                            readOnly: true
                          started_by:
                            description: Name of the operator who started the Failure's resolution.
                            type:
                              - string
                              - 'null'
                            readOnly: true
                          paused_by:
                            description: Name of the operator who paused the Failure's resolution.
                            type:
                              - string
                              - 'null'
                            readOnly: true
                          reported_by:
                            description: Name of the operator who reported the Failure.
                            type:
                              - string
                              - 'null'
                            readOnly: true
                          manpower_duration:
                            description: Duration of the Failure's manpower time in `ISO8601` format.
                            type:
                              - string
                              - 'null'
                            readOnly: true
                            examples:
                              - P0Y0M0DT7H27M0S
                          cost_center_id:
                            description: ID of the cost center associated to the Failure
                            type:
                              - integer
                              - 'null'
                          network_failure_id:
                            description: ID of the Network Failure
                            type: integer
                            readOnly: true
                            examples:
                              - 1
                          created_at:
                            type: string
                            format: date-time
                            readOnly: true
                          updated_at:
                            type: string
                            format: date-time
                            readOnly: true
                          date_deleted:
                            type: string
                            format: date-time
                            readOnly: true
                      relationships:
                        type: object
                        properties:
                          approvedBy:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - operator
                                    readOnly: true
                                  id:
                                    type: string
                                    readOnly: true
                          completedBy:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - operator
                                    readOnly: true
                                  id:
                                    type: string
                                    readOnly: true
                          createdBy:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - operator
                                    readOnly: true
                                  id:
                                    type: string
                                    readOnly: true
                          files:
                            type: object
                            properties:
                              data:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - file
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                          location:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - location
                                    readOnly: true
                                  id:
                                    type: string
                                    readOnly: true
                          operator:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - operator
                                    readOnly: true
                                  id:
                                    type: string
                                    readOnly: true
                    required:
                      - id
                      - type
                      - attributes
              examples:
                Example:
                  value:
                    data:
                      type: failure
                      id: '999'
                      attributes:
                        failure_id: 999
                        problem_id: 999
                        problem_name: Electricity - Short Circuit
                        status: COMPLETED
                        state: COMPLETED_CONFIRMED
                        report_date: '2020-08-28 08:48:00'
                        completed_date: '2020-08-28 17:12:00'
                        approved_date: '2020-08-28 09:30:00'
                        paused_date: '2020-08-28 13:05:00'
                        description: Needs replacement
                        state_description: Closed
                        observations: The short circuit occurred after plug the hair dryer
                        entity_id: 12
                        priority: 1
                        priority_text: URGENT
                        client_id: 999
                        client_code: JDC
                        client_name: John Doe Co.
                        local_id: 999
                        local_code: MB.1.MR
                        local_name: Main Building - 1st Floor - Main room
                        root_local_id: 999
                        solved: true
                        confirmed: false
                        next_schedule: '2020-08-29 10:30:00'
                        message_count: 3
                        time_statistics:
                          approved_date: '2020-08-28 09:30:00'
                          last_completed_date: '2020-08-28 17:12:00'
                          last_paused_date: '2020-08-28 13:05:00'
                          last_paused_description: Waiting for materials
                          started_date: '2020-08-28 09:45:00'
                          time_to_approve: P0Y0M0DT0H42M0S
                          time_to_complete: P0Y0M0DT8H24M0S
                          time_to_complete_after_started: P0Y0M0DT7H27M0S
                          time_to_start: P0Y0M0DT0H57M0S
                          time_to_start_after_approved: P0Y0M0DT0H15M0S
                          real_duration: P0Y0M0DT7H27M0S
                        supplier_id: 999
                        signature_status: NOT_SIGNED
                        last_status_change_date: '2020-08-28 09:30:00'
                        next_sla_percentage: '75.29520563697858'
                        approved_by_id: 999
                        completed_by_id: 999
                        reported_by_id: 999
                        started_by_id: 999
                        manpower_duration: P0Y0M0DT7H27M0S
                        manpower_cost: '0.01'
                        started_date: '2020-08-28 09:45:00'
                        next_sla_date: '2020-08-28 09:30:00'
                        failure_priority_id: 202
                        created_at: '2024-07-09 22:27:21'
                        updated_at: '2025-05-23 15:47:47'
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
      x-toolbox: true
  /failures/closed:
    get:
      operationId: getClosedFailures
      tags:
        - Failures
      summary: List closed Failures
      description: >
        This endpoint allows you to list all closed Failures (those **in** state `COMPLETED`).


        The query parameters described below are to be used with the
        [JQL](../../../../../../../docs/api/.markdown/1.introduction/4-parameters.md).
      parameters:
        - name: approved_date
          in: query
          description: Filter results by the approval date of the Failure.
          schema:
            type: string
            format: date-time
        - name: completed_date
          in: query
          description: Filter results by the completion date of the Failure.
          schema:
            type: string
            format: date-time
        - name: failure_id
          in: query
          description: Filter results by the ID of the Failure
          schema:
            type: integer
        - name: last_status_change_date
          in: query
          description: Filter results by the last status change date of the Failure.
          schema:
            type: string
            format: date-time
        - name: local_id
          in: query
          description: Filter results by the local of the Failure.
          schema:
            type: integer
        - name: problem_id
          in: query
          description: Filter results by the problem of the Failure.
          schema:
            type: integer
        - name: start_date
          in: query
          description: Filter results by the date of report of the Failure.
          schema:
            type: string
            format: date-time
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      title: Failure
                      description: Failure model structure details
                      type: object
                      properties:
                        id:
                          description: ID of the Failure
                          type: string
                          readOnly: true
                        type:
                          description: Model type
                          type: string
                          enum:
                            - failure
                          readOnly: true
                        attributes:
                          type: object
                          properties:
                            failure_id:
                              description: ID of the Failure
                              type: integer
                              readOnly: true
                              examples:
                                - 1
                            uuid:
                              description: Universally Unique Identifier for the Failure
                              type: string
                              format: uuid
                              readOnly: true
                            problem_id:
                              description: ID of the associated problem
                              type: integer
                            status:
                              type: string
                              enum:
                                - WAITING_APPROVAL
                                - WAITING_RESOLUTION
                                - IN_RESOLUTION
                                - PAUSED
                                - COMPLETED
                                - ARCHIVED
                              readOnly: true
                            start_date:
                              type: string
                              format: date-time
                              readOnly: true
                              examples:
                                - '2020-08-28T08:48:00.000Z'
                            completed_date:
                              type:
                                - string
                                - 'null'
                              format: date-time
                              readOnly: true
                              examples:
                                - '2020-08-28T17:12:00.000Z'
                            approved_date:
                              type:
                                - string
                                - 'null'
                              format: date-time
                              readOnly: true
                              examples:
                                - '2020-08-28T09:30:00.000Z'
                            paused_date:
                              type:
                                - string
                                - 'null'
                              format: date-time
                              readOnly: true
                              examples:
                                - '2020-08-28T13:05:00.000Z'
                            description:
                              type: string
                              examples:
                                - Needs replacement
                            last_status_description:
                              type: string
                              examples:
                                - Completed
                            observations:
                              type:
                                - string
                                - 'null'
                              examples:
                                - Needs a new part
                            code:
                              type: string
                              examples:
                                - WO2022
                            fts_vector:
                              description: Denormalized data of a Failure
                              type: string
                            priority:
                              description: Failure priority number being 1 the lowest priority and 4 the highest priority.
                              type: integer
                              enum:
                                - 1
                                - 2
                                - 3
                                - 4
                            client_id:
                              description: ID of the associated client defined according to the respective `local_id`.
                              type: integer
                              readOnly: true
                            entity_id:
                              description: ID of the Entity of the Failure
                              type: integer
                              readOnly: true
                            metering_registry_id:
                              description: ID of a possible associated metering registry
                              type:
                                - integer
                                - 'null'
                              readOnly: true
                            local_id:
                              description: ID of the location associated to the Failure
                              type: integer
                            paused_reason_id:
                              description: ID of the paused reason associated to the Failure
                              type: integer
                            external_id:
                              description: External ID to be associated to the Failure
                              type:
                                - string
                                - 'null'
                            report_name:
                              description: Name of who reported the Failure
                              type: string
                            solved:
                              description: Indicates whether the Failure was closed successfully or not
                              type: boolean
                              readOnly: true
                              default: false
                            confirmed:
                              description: Indicates whether the Failure is confirmed or not
                              type: boolean
                              readOnly: true
                              default: false
                            started:
                              description: Indicates whether the Failure is started or not
                              type: boolean
                              readOnly: true
                              default: false
                            paused:
                              description: Indicates whether the Failure is paused or not
                              type: boolean
                              readOnly: true
                              default: false
                            completed:
                              description: Indicates whether the Failure is completed or not
                              type: boolean
                              readOnly: true
                              default: false
                            archived:
                              description: Indicates whether the Failure is archived or not
                              type: boolean
                              readOnly: true
                              default: false
                            approved:
                              description: Indicates whether the Failure is approved or not
                              type: boolean
                              readOnly: true
                              default: false
                            next_schedule:
                              type:
                                - string
                                - 'null'
                              format: date-time
                              readOnly: true
                              examples:
                                - '2020-08-29T10:30:00.000Z'
                            message_count:
                              type: integer
                              minimum: 0
                              default: 0
                              examples:
                                - 3
                            time_statistics:
                              type: object
                              properties:
                                approved_date:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T09:30:00.000Z'
                                last_completed_date:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T17:12:00.000Z'
                                last_paused_date:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T13:05:00.000Z'
                                started_date:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T09:45:00.000Z'
                                time_to_approve:
                                  description: Duration it took to approve the Failure since reported in `ISO8601` format.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                  examples:
                                    - P0Y0M0DT0H42M0S
                                time_to_complete:
                                  description: Duration it took to complete the Failure since reported in `ISO8601` format.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                  examples:
                                    - P0Y0M0DT8H24M0S
                                time_to_complete_after_started:
                                  description: >-
                                    Duration it took to complete the Failure since the resolution started in `ISO8601`
                                    format.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                  examples:
                                    - P0Y0M0DT7H27M0S
                                time_to_start:
                                  description: >-
                                    Duration it took to start the Failure's resolution since reported in `ISO8601`
                                    format.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                  examples:
                                    - P0Y0M0DT0H57M0S
                                time_to_start_after_approved:
                                  description: >-
                                    Duration it took to start the Failure's resolution since approved in `ISO8601`
                                    format.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                  examples:
                                    - P0Y0M0DT0H15M0S
                                real_duration:
                                  description: Real duration of the Failure's resolution time in `ISO8601` format.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                  examples:
                                    - P0Y0M0DT7H27M0S
                            supplier_id:
                              description: ID of the supplier associated to the Failure
                              type: integer
                            signature_status:
                              description: Indicates whether the Failure is signed or not
                              type: string
                              enum:
                                - SIGNED
                                - NOT_SIGNED
                              default: NOT_SIGNED
                            last_status_change_date:
                              type: string
                              format: date-time
                              readOnly: true
                              examples:
                                - '2020-08-28T09:30:00.000Z'
                            approved_by_id:
                              description: ID of the operator who approved the Failure.
                              type:
                                - integer
                                - 'null'
                              readOnly: true
                            completed_by_id:
                              description: ID of the operator who completed the Failure.
                              type:
                                - integer
                                - 'null'
                              readOnly: true
                            started_by_id:
                              description: ID of the operator who started the Failure's resolution.
                              type:
                                - integer
                                - 'null'
                              readOnly: true
                            paused_by_id:
                              description: ID of the operator who paused the Failure's resolution.
                              type:
                                - integer
                                - 'null'
                              readOnly: true
                            approved_by:
                              description: Name of the operator who approved the Failure.
                              type:
                                - string
                                - 'null'
                              readOnly: true
                            completed_by:
                              description: Name of the operator who completed the Failure.
                              type:
                                - string
                                - 'null'
                              readOnly: true
                            started_by:
                              description: Name of the operator who started the Failure's resolution.
                              type:
                                - string
                                - 'null'
                              readOnly: true
                            paused_by:
                              description: Name of the operator who paused the Failure's resolution.
                              type:
                                - string
                                - 'null'
                              readOnly: true
                            reported_by:
                              description: Name of the operator who reported the Failure.
                              type:
                                - string
                                - 'null'
                              readOnly: true
                            manpower_duration:
                              description: Duration of the Failure's manpower time in `ISO8601` format.
                              type:
                                - string
                                - 'null'
                              readOnly: true
                              examples:
                                - P0Y0M0DT7H27M0S
                            cost_center_id:
                              description: ID of the cost center associated to the Failure
                              type:
                                - integer
                                - 'null'
                            network_failure_id:
                              description: ID of the Network Failure
                              type: integer
                              readOnly: true
                              examples:
                                - 1
                            created_at:
                              type: string
                              format: date-time
                              readOnly: true
                            updated_at:
                              type: string
                              format: date-time
                              readOnly: true
                            date_deleted:
                              type: string
                              format: date-time
                              readOnly: true
                        relationships:
                          type: object
                          properties:
                            approvedBy:
                              type: object
                              properties:
                                data:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - operator
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                            completedBy:
                              type: object
                              properties:
                                data:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - operator
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                            createdBy:
                              type: object
                              properties:
                                data:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - operator
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                            files:
                              type: object
                              properties:
                                data:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - file
                                        readOnly: true
                                      id:
                                        type: string
                                        readOnly: true
                            location:
                              type: object
                              properties:
                                data:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - location
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                            operator:
                              type: object
                              properties:
                                data:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - operator
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                      required:
                        - id
                        - type
                        - attributes
                  included:
                    description: List of relationships to be included
                    type: array
                    items:
                      anyOf:
                        - title: File
                          description: File model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the File
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - file
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                file_id:
                                  description: File Id
                                  type: integer
                                  readOnly: true
                                file_uuid:
                                  description: File UUID
                                  type: string
                                  readOnly: true
                                related_to:
                                  description: Object which the File is related to
                                  type: string
                                  enum:
                                    - BUILDING
                                    - CATEGORY
                                    - CLIENT
                                    - ELEMENT
                                    - ELEMENT_REGISTRY
                                    - FAILURE
                                    - METERING_REGISTRY
                                    - OPERATOR
                                    - ORDER
                                    - QUOTE
                                    - QUOTE_REQUEST
                                    - RECEIVED_QUOTE
                                    - RECEIVED_QUOTE_REQUEST
                                    - REQUEST
                                    - SELL_ORDER
                                    - SUPPLIER
                                    - SCHEDULE_WORK
                                    - WORK
                                    - SCHEDULED_WORK
                                    - PURCHASE
                                    - PURCHASE_MATERIAL_LINE
                                    - PURCHASE_SERVICE_LINE
                                    - SALE
                                related_to_id:
                                  description: Relations Id
                                  type: integer
                                related_type:
                                  description: Object which the File is related to
                                  type: string
                                  enum:
                                    - BUILDING
                                    - CATEGORY
                                    - CLIENT
                                    - ELEMENT
                                    - ELEMENT_REGISTRY
                                    - FAILURE
                                    - METERING_REGISTRY
                                    - OPERATOR
                                    - ORDER
                                    - QUOTE
                                    - QUOTE_REQUEST
                                    - RECEIVED_QUOTE
                                    - RECEIVED_QUOTE_REQUEST
                                    - REQUEST
                                    - SELL_ORDER
                                    - SUPPLIER
                                    - SCHEDULE_WORK
                                    - WORK
                                  readOnly: true
                                file_label_id:
                                  description: File Label Id
                                  type:
                                    - integer
                                    - 'null'
                                name:
                                  description: File name
                                  type: string
                                  examples:
                                    - my_example_file
                                thumb:
                                  description: URL to the thumbnail, in case the File is an image.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                file_url:
                                  description: URL to the File
                                  type: string
                                  format: uri
                                  readOnly: true
                                description:
                                  type:
                                    - string
                                    - 'null'
                                expire_date:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T17:12:00.000Z'
                                has_reminder:
                                  type: boolean
                                  readOnly: true
                                file_type:
                                  description: Internal type of the file
                                  type: string
                                  enum:
                                    - cad
                                    - compressed
                                    - file
                                    - image
                                    - office
                                    - other
                                    - pdf
                                    - signature
                                    - video
                                  readOnly: true
                                permission_to_technician:
                                  type: boolean
                                  default: true
                                permission_to_manager:
                                  type: boolean
                                  default: true
                                permission_to_direct:
                                  type: boolean
                                  default: false
                                extension:
                                  type: string
                                  enum:
                                    - 3gp
                                    - 3gpp
                                    - bin
                                    - bmp
                                    - cad
                                    - csv
                                    - doc
                                    - docx
                                    - gif
                                    - jpeg
                                    - jpg
                                    - kmz
                                    - mov
                                    - mp4
                                    - odf
                                    - odp
                                    - pdf
                                    - png
                                    - ppt
                                    - pptx
                                    - qt
                                    - rar
                                    - txt
                                    - xls
                                    - xlsx
                                    - zip
                                  readOnly: true
                                network_status:
                                  description: Show the network status of the file.
                                  type: string
                                  enum:
                                    - SHARED
                                    - RECEIVED
                                    - NOT_SHARED
                                shared_with_supplier:
                                  description: Show if the file is currently in a shared status with the supplier.
                                  type: boolean
                                shared_with_client:
                                  description: Show if the file is currently in a shared status with the client.
                                  type: boolean
                                file_size:
                                  type: integer
                                  readOnly: true
                                created_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                  readOnly: true
                          required:
                            - id
                            - type
                            - attributes
                        - title: Location
                          description: Location model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Location
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - location
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                entity_id:
                                  type: integer
                                name:
                                  description: Location name
                                  type: string
                                full_name:
                                  description: Names of the location's parents concatenated by hyphen with location name.
                                  type: string
                                  readOnly: true
                                code:
                                  description: Location code.
                                  type: string
                                full_code:
                                  description: Codes of the location's parents concatenated by dot with location code.
                                  type: string
                                  readOnly: true
                                original_full_code:
                                  description: Location original full code.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                observation:
                                  description: Additional information
                                  type:
                                    - string
                                    - 'null'
                                date_updated:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - '2020-12-03 12:45:00'
                                parent_id:
                                  description: ID of the location parent.
                                  type: integer
                                root_parent_id:
                                  description: ID of the location root parent (of `type` equals to `building`).
                                  type: integer
                                  readOnly: true
                                area:
                                  description: Location area
                                  type:
                                    - number
                                    - 'null'
                                glass_area:
                                  description: Location glass area
                                  type:
                                    - number
                                    - 'null'
                                volume:
                                  description: Location volume
                                  type:
                                    - number
                                    - 'null'
                                orientation:
                                  description: Solar orientation (North, South, West, East)
                                  type:
                                    - string
                                    - 'null'
                                is_from_network:
                                  description: If Location is from network
                                  type: boolean
                                  readOnly: true
                                local_uuid:
                                  description: Location UUID
                                  type: string
                                  format: uuid
                                  readOnly: true
                                assets_count:
                                  description: >-
                                    Cumulative count of assets (equipment) in this location and all its descendants.
                                    Only present when `with_assets_count=true` query parameter is provided.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                associations:
                                  description: >
                                    List of ways the operator is associated with this building. Possible values are
                                    `DIRECT` (via a direct local-operator assignment), `TEAM` (via a team the operator
                                    belongs to), and `CLIENT` (via a client the operator is assigned to).
                                  type: array
                                  items:
                                    type: string
                                    enum:
                                      - DIRECT
                                      - TEAM
                                      - CLIENT
                              required:
                                - name
                                - full_name
                                - code
                                - full_code
                                - observation
                                - date_updated
                            relationships:
                              type: object
                              properties:
                                building:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - building
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                files:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - file
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                operators:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - operator
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                localOrientation:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - localOrientation
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                          required:
                            - id
                            - type
                            - attributes
                        - title: Operator
                          description: Operator model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Operator
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - operator
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                operator_id:
                                  description: ID of the Operator
                                  type: integer
                                  readOnly: true
                                operator_uuid:
                                  description: Uuid of the Operator
                                  type: string
                                  format: uuid
                                  readOnly: true
                                full_name:
                                  type: string
                                email:
                                  type: string
                                  format: email
                                phone:
                                  type:
                                    - string
                                    - 'null'
                                cellphone:
                                  type:
                                    - string
                                    - 'null'
                                account:
                                  description: Type of account which determines the access permission level.
                                  type: string
                                  enum:
                                    - admin
                                    - manager
                                    - technician
                                    - operator
                                    - reporter
                                language:
                                  type: string
                                  enum:
                                    - ar
                                    - ca
                                    - da_dk
                                    - en
                                    - es
                                    - fr_fr
                                    - pl_pl
                                    - pt_br
                                    - pt_pt
                                    - ko
                                    - zh_cn
                                    - nl_nl
                                    - de_de
                                cost_per_hour:
                                  type: number
                                  minimum: 0
                                  examples:
                                    - 10
                                warehouse_id:
                                  description: ID of the warehouse associated to the Operator by default.
                                  type: integer
                                entity_id:
                                  type: integer
                                  readOnly: true
                                timezone:
                                  description: >
                                    Valid PHP timezone identifier. See the full list here:
                                    https://www.php.net/manual/en/timezones.php.
                                  type: string
                                  examples:
                                    - Europe/Lisbon
                                is_from_network:
                                  type: boolean
                                created_at:
                                  type: string
                                  format: date-time
                                phone_country_code:
                                  type: string
                                  examples:
                                    - US
                                is_first_web_login:
                                  type:
                                    - boolean
                                    - 'null'
                                  readOnly: true
                                status:
                                  type: string
                                  enum:
                                    - WORKING
                                    - AVAILABLE
                                    - OFFLINE
                                  examples:
                                    - WORKING
                            meta:
                              type: object
                              properties:
                                custom_fields:
                                  type:
                                    - object
                                    - 'null'
                                  additionalProperties:
                                    oneOf:
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - SELECT
                                            examples:
                                              - SELECT
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                option_id:
                                                  description: The ID of the selected option
                                                  type: integer
                                                  examples:
                                                    - 123
                                                option_code:
                                                  description: The code of the selected option
                                                  type:
                                                    - string
                                                    - 'null'
                                                  examples:
                                                    - OP01
                                                value:
                                                  description: The value of the selected option
                                                  type: string
                                                  examples:
                                                    - My Option 1
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field supports selecting multiple values
                                                    type: boolean
                                                    examples:
                                                      - true
                                                  managed_by_integrations:
                                                    description: >-
                                                      Indicates if the Custom Field options are only managed by
                                                      integrations
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - TEXT
                                            examples:
                                              - TEXT
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            examples:
                                              - abc
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (Empty for Custom Fields of
                                                  type TEXT)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - BOOLEAN
                                            examples:
                                              - BOOLEAN
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - boolean
                                              - 'null'
                                            examples:
                                              - true
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (There are none for the Custom
                                                  Field Boolean type)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - RELATIONSHIP
                                            examples:
                                              - RELATIONSHIP
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                related_to_type:
                                                  description: The type of object that is selected as the Custom Field Values
                                                  type: string
                                                  enum:
                                                    - CLIENT
                                                    - CONTACT
                                                  examples:
                                                    - CLIENT
                                                related_to_id:
                                                  description: The ID of object that is selected as the Custom Field Value
                                                  type: integer
                                                  examples:
                                                    - 123
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field allows multiple selection
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  relationship_object:
                                                    description: The type of object that is selected as the Custom Field Values
                                                    type: string
                                                    enum:
                                                      - CLIENT
                                                      - CONTACT
                                                    examples:
                                                      - CLIENT
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - DATETIME
                                            examples:
                                              - DATETIME
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-12-12 12:39:00'
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_past_dates:
                                                    description: Indicates if this Custom Field support past dates
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  allow_future_dates:
                                                    description: Indicates if this Custom Field support future dates
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - NUMBER
                                            examples:
                                              - NUMBER
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - integer
                                              - 'null'
                                            examples:
                                              - 12
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  min:
                                                    description: Indicates the minimum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 1
                                                  max:
                                                    description: Indicates the maximum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 3
                                    discriminator:
                                      propertyName: field_type
                    uniqueItems: true
                  meta:
                    title: Meta
                    description: Meta model structure details
                    type: object
                    properties:
                      pagination:
                        type: object
                        properties:
                          total:
                            description: Total items.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          count:
                            description: Total items returned for the current page.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          per_page:
                            description: Maximum number of records per page.
                            type: integer
                            minimum: 1
                            default: 200
                            examples:
                              - 1
                          current_page:
                            description: Number of the current page.
                            type: integer
                            minimum: 1
                            default: 1
                          total_pages:
                            description: Number of the total pages.
                            type: integer
                            minimum: 1
                            default: 1
                        required:
                          - total
                          - count
                          - per_page
                          - current_page
                          - total_pages
                  links:
                    title: Response Links on listing operations
                    description: >-
                      Requests that return multiple items include a `links` attribute, with links related to request's
                      context.
                    type: object
                    properties:
                      self:
                        description: Current response link.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      first:
                        description: Link to the first page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      last:
                        description: Link to the previous page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      next:
                        description: Link to the next page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                    required:
                      - self
                      - first
                      - last
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /failures/open:
    get:
      operationId: getOpenFailures
      tags:
        - Failures
      summary: List open Failures
      description: >
        This endpoint allows you to list all currently open Failures (**not** in states `COMPLETED` and `ARCHIVED`).

        Although you can filter the results by status, keep in mind that if you use the `COMPLETED` or `ARCHIVED`
        status, this endpoint will always return an empty list.


        The query parameters described below are to be used with the
        [JQL](../../../../../../../docs/api/.markdown/1.introduction/4-parameters.md).
      parameters:
        - name: approved_date
          in: query
          description: Filter results by the approval date of the Failure.
          schema:
            type: string
            format: date-time
        - name: completed_date
          in: query
          description: Filter results by the completion date of the Failure.
          schema:
            type: string
            format: date-time
        - name: failure_id
          in: query
          description: Filter results by the ID of the Failure
          schema:
            type: integer
        - name: last_status_change_date
          in: query
          description: Filter results by the last status change date of the Failure.
          schema:
            type: string
            format: date-time
        - name: local_id
          in: query
          description: Filter results by the local of the Failure.
          schema:
            type: integer
        - name: problem_id
          in: query
          description: Filter results by the problem of the Failure.
          schema:
            type: integer
        - name: start_date
          in: query
          description: Filter results by the date of report of the Failure.
          schema:
            type: string
            format: date-time
        - name: status
          in: query
          description: Filter results by the status of the Failure.
          schema:
            type: string
            enum:
              - WAITING_APPROVAL
              - WAITING_RESOLUTION
              - IN_RESOLUTION
              - PAUSED
              - COMPLETED
              - ARCHIVED
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      title: Failure
                      description: Failure model structure details
                      type: object
                      properties:
                        id:
                          description: ID of the Failure
                          type: string
                          readOnly: true
                        type:
                          description: Model type
                          type: string
                          enum:
                            - failure
                          readOnly: true
                        attributes:
                          type: object
                          properties:
                            failure_id:
                              description: ID of the Failure
                              type: integer
                              readOnly: true
                              examples:
                                - 1
                            uuid:
                              description: Universally Unique Identifier for the Failure
                              type: string
                              format: uuid
                              readOnly: true
                            problem_id:
                              description: ID of the associated problem
                              type: integer
                            status:
                              type: string
                              enum:
                                - WAITING_APPROVAL
                                - WAITING_RESOLUTION
                                - IN_RESOLUTION
                                - PAUSED
                                - COMPLETED
                                - ARCHIVED
                              readOnly: true
                            start_date:
                              type: string
                              format: date-time
                              readOnly: true
                              examples:
                                - '2020-08-28T08:48:00.000Z'
                            completed_date:
                              type:
                                - string
                                - 'null'
                              format: date-time
                              readOnly: true
                              examples:
                                - '2020-08-28T17:12:00.000Z'
                            approved_date:
                              type:
                                - string
                                - 'null'
                              format: date-time
                              readOnly: true
                              examples:
                                - '2020-08-28T09:30:00.000Z'
                            paused_date:
                              type:
                                - string
                                - 'null'
                              format: date-time
                              readOnly: true
                              examples:
                                - '2020-08-28T13:05:00.000Z'
                            description:
                              type: string
                              examples:
                                - Needs replacement
                            last_status_description:
                              type: string
                              examples:
                                - Completed
                            observations:
                              type:
                                - string
                                - 'null'
                              examples:
                                - Needs a new part
                            code:
                              type: string
                              examples:
                                - WO2022
                            fts_vector:
                              description: Denormalized data of a Failure
                              type: string
                            priority:
                              description: Failure priority number being 1 the lowest priority and 4 the highest priority.
                              type: integer
                              enum:
                                - 1
                                - 2
                                - 3
                                - 4
                            client_id:
                              description: ID of the associated client defined according to the respective `local_id`.
                              type: integer
                              readOnly: true
                            entity_id:
                              description: ID of the Entity of the Failure
                              type: integer
                              readOnly: true
                            metering_registry_id:
                              description: ID of a possible associated metering registry
                              type:
                                - integer
                                - 'null'
                              readOnly: true
                            local_id:
                              description: ID of the location associated to the Failure
                              type: integer
                            paused_reason_id:
                              description: ID of the paused reason associated to the Failure
                              type: integer
                            external_id:
                              description: External ID to be associated to the Failure
                              type:
                                - string
                                - 'null'
                            report_name:
                              description: Name of who reported the Failure
                              type: string
                            solved:
                              description: Indicates whether the Failure was closed successfully or not
                              type: boolean
                              readOnly: true
                              default: false
                            confirmed:
                              description: Indicates whether the Failure is confirmed or not
                              type: boolean
                              readOnly: true
                              default: false
                            started:
                              description: Indicates whether the Failure is started or not
                              type: boolean
                              readOnly: true
                              default: false
                            paused:
                              description: Indicates whether the Failure is paused or not
                              type: boolean
                              readOnly: true
                              default: false
                            completed:
                              description: Indicates whether the Failure is completed or not
                              type: boolean
                              readOnly: true
                              default: false
                            archived:
                              description: Indicates whether the Failure is archived or not
                              type: boolean
                              readOnly: true
                              default: false
                            approved:
                              description: Indicates whether the Failure is approved or not
                              type: boolean
                              readOnly: true
                              default: false
                            next_schedule:
                              type:
                                - string
                                - 'null'
                              format: date-time
                              readOnly: true
                              examples:
                                - '2020-08-29T10:30:00.000Z'
                            message_count:
                              type: integer
                              minimum: 0
                              default: 0
                              examples:
                                - 3
                            time_statistics:
                              type: object
                              properties:
                                approved_date:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T09:30:00.000Z'
                                last_completed_date:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T17:12:00.000Z'
                                last_paused_date:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T13:05:00.000Z'
                                started_date:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T09:45:00.000Z'
                                time_to_approve:
                                  description: Duration it took to approve the Failure since reported in `ISO8601` format.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                  examples:
                                    - P0Y0M0DT0H42M0S
                                time_to_complete:
                                  description: Duration it took to complete the Failure since reported in `ISO8601` format.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                  examples:
                                    - P0Y0M0DT8H24M0S
                                time_to_complete_after_started:
                                  description: >-
                                    Duration it took to complete the Failure since the resolution started in `ISO8601`
                                    format.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                  examples:
                                    - P0Y0M0DT7H27M0S
                                time_to_start:
                                  description: >-
                                    Duration it took to start the Failure's resolution since reported in `ISO8601`
                                    format.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                  examples:
                                    - P0Y0M0DT0H57M0S
                                time_to_start_after_approved:
                                  description: >-
                                    Duration it took to start the Failure's resolution since approved in `ISO8601`
                                    format.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                  examples:
                                    - P0Y0M0DT0H15M0S
                                real_duration:
                                  description: Real duration of the Failure's resolution time in `ISO8601` format.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                  examples:
                                    - P0Y0M0DT7H27M0S
                            supplier_id:
                              description: ID of the supplier associated to the Failure
                              type: integer
                            signature_status:
                              description: Indicates whether the Failure is signed or not
                              type: string
                              enum:
                                - SIGNED
                                - NOT_SIGNED
                              default: NOT_SIGNED
                            last_status_change_date:
                              type: string
                              format: date-time
                              readOnly: true
                              examples:
                                - '2020-08-28T09:30:00.000Z'
                            approved_by_id:
                              description: ID of the operator who approved the Failure.
                              type:
                                - integer
                                - 'null'
                              readOnly: true
                            completed_by_id:
                              description: ID of the operator who completed the Failure.
                              type:
                                - integer
                                - 'null'
                              readOnly: true
                            started_by_id:
                              description: ID of the operator who started the Failure's resolution.
                              type:
                                - integer
                                - 'null'
                              readOnly: true
                            paused_by_id:
                              description: ID of the operator who paused the Failure's resolution.
                              type:
                                - integer
                                - 'null'
                              readOnly: true
                            approved_by:
                              description: Name of the operator who approved the Failure.
                              type:
                                - string
                                - 'null'
                              readOnly: true
                            completed_by:
                              description: Name of the operator who completed the Failure.
                              type:
                                - string
                                - 'null'
                              readOnly: true
                            started_by:
                              description: Name of the operator who started the Failure's resolution.
                              type:
                                - string
                                - 'null'
                              readOnly: true
                            paused_by:
                              description: Name of the operator who paused the Failure's resolution.
                              type:
                                - string
                                - 'null'
                              readOnly: true
                            reported_by:
                              description: Name of the operator who reported the Failure.
                              type:
                                - string
                                - 'null'
                              readOnly: true
                            manpower_duration:
                              description: Duration of the Failure's manpower time in `ISO8601` format.
                              type:
                                - string
                                - 'null'
                              readOnly: true
                              examples:
                                - P0Y0M0DT7H27M0S
                            cost_center_id:
                              description: ID of the cost center associated to the Failure
                              type:
                                - integer
                                - 'null'
                            network_failure_id:
                              description: ID of the Network Failure
                              type: integer
                              readOnly: true
                              examples:
                                - 1
                            created_at:
                              type: string
                              format: date-time
                              readOnly: true
                            updated_at:
                              type: string
                              format: date-time
                              readOnly: true
                            date_deleted:
                              type: string
                              format: date-time
                              readOnly: true
                        relationships:
                          type: object
                          properties:
                            approvedBy:
                              type: object
                              properties:
                                data:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - operator
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                            completedBy:
                              type: object
                              properties:
                                data:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - operator
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                            createdBy:
                              type: object
                              properties:
                                data:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - operator
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                            files:
                              type: object
                              properties:
                                data:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - file
                                        readOnly: true
                                      id:
                                        type: string
                                        readOnly: true
                            location:
                              type: object
                              properties:
                                data:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - location
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                            operator:
                              type: object
                              properties:
                                data:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - operator
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                      required:
                        - id
                        - type
                        - attributes
                  included:
                    description: List of relationships to be included
                    type: array
                    items:
                      anyOf:
                        - title: File
                          description: File model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the File
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - file
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                file_id:
                                  description: File Id
                                  type: integer
                                  readOnly: true
                                file_uuid:
                                  description: File UUID
                                  type: string
                                  readOnly: true
                                related_to:
                                  description: Object which the File is related to
                                  type: string
                                  enum:
                                    - BUILDING
                                    - CATEGORY
                                    - CLIENT
                                    - ELEMENT
                                    - ELEMENT_REGISTRY
                                    - FAILURE
                                    - METERING_REGISTRY
                                    - OPERATOR
                                    - ORDER
                                    - QUOTE
                                    - QUOTE_REQUEST
                                    - RECEIVED_QUOTE
                                    - RECEIVED_QUOTE_REQUEST
                                    - REQUEST
                                    - SELL_ORDER
                                    - SUPPLIER
                                    - SCHEDULE_WORK
                                    - WORK
                                    - SCHEDULED_WORK
                                    - PURCHASE
                                    - PURCHASE_MATERIAL_LINE
                                    - PURCHASE_SERVICE_LINE
                                    - SALE
                                related_to_id:
                                  description: Relations Id
                                  type: integer
                                related_type:
                                  description: Object which the File is related to
                                  type: string
                                  enum:
                                    - BUILDING
                                    - CATEGORY
                                    - CLIENT
                                    - ELEMENT
                                    - ELEMENT_REGISTRY
                                    - FAILURE
                                    - METERING_REGISTRY
                                    - OPERATOR
                                    - ORDER
                                    - QUOTE
                                    - QUOTE_REQUEST
                                    - RECEIVED_QUOTE
                                    - RECEIVED_QUOTE_REQUEST
                                    - REQUEST
                                    - SELL_ORDER
                                    - SUPPLIER
                                    - SCHEDULE_WORK
                                    - WORK
                                  readOnly: true
                                file_label_id:
                                  description: File Label Id
                                  type:
                                    - integer
                                    - 'null'
                                name:
                                  description: File name
                                  type: string
                                  examples:
                                    - my_example_file
                                thumb:
                                  description: URL to the thumbnail, in case the File is an image.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                file_url:
                                  description: URL to the File
                                  type: string
                                  format: uri
                                  readOnly: true
                                description:
                                  type:
                                    - string
                                    - 'null'
                                expire_date:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T17:12:00.000Z'
                                has_reminder:
                                  type: boolean
                                  readOnly: true
                                file_type:
                                  description: Internal type of the file
                                  type: string
                                  enum:
                                    - cad
                                    - compressed
                                    - file
                                    - image
                                    - office
                                    - other
                                    - pdf
                                    - signature
                                    - video
                                  readOnly: true
                                permission_to_technician:
                                  type: boolean
                                  default: true
                                permission_to_manager:
                                  type: boolean
                                  default: true
                                permission_to_direct:
                                  type: boolean
                                  default: false
                                extension:
                                  type: string
                                  enum:
                                    - 3gp
                                    - 3gpp
                                    - bin
                                    - bmp
                                    - cad
                                    - csv
                                    - doc
                                    - docx
                                    - gif
                                    - jpeg
                                    - jpg
                                    - kmz
                                    - mov
                                    - mp4
                                    - odf
                                    - odp
                                    - pdf
                                    - png
                                    - ppt
                                    - pptx
                                    - qt
                                    - rar
                                    - txt
                                    - xls
                                    - xlsx
                                    - zip
                                  readOnly: true
                                network_status:
                                  description: Show the network status of the file.
                                  type: string
                                  enum:
                                    - SHARED
                                    - RECEIVED
                                    - NOT_SHARED
                                shared_with_supplier:
                                  description: Show if the file is currently in a shared status with the supplier.
                                  type: boolean
                                shared_with_client:
                                  description: Show if the file is currently in a shared status with the client.
                                  type: boolean
                                file_size:
                                  type: integer
                                  readOnly: true
                                created_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                  readOnly: true
                          required:
                            - id
                            - type
                            - attributes
                        - title: Location
                          description: Location model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Location
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - location
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                entity_id:
                                  type: integer
                                name:
                                  description: Location name
                                  type: string
                                full_name:
                                  description: Names of the location's parents concatenated by hyphen with location name.
                                  type: string
                                  readOnly: true
                                code:
                                  description: Location code.
                                  type: string
                                full_code:
                                  description: Codes of the location's parents concatenated by dot with location code.
                                  type: string
                                  readOnly: true
                                original_full_code:
                                  description: Location original full code.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                observation:
                                  description: Additional information
                                  type:
                                    - string
                                    - 'null'
                                date_updated:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - '2020-12-03 12:45:00'
                                parent_id:
                                  description: ID of the location parent.
                                  type: integer
                                root_parent_id:
                                  description: ID of the location root parent (of `type` equals to `building`).
                                  type: integer
                                  readOnly: true
                                area:
                                  description: Location area
                                  type:
                                    - number
                                    - 'null'
                                glass_area:
                                  description: Location glass area
                                  type:
                                    - number
                                    - 'null'
                                volume:
                                  description: Location volume
                                  type:
                                    - number
                                    - 'null'
                                orientation:
                                  description: Solar orientation (North, South, West, East)
                                  type:
                                    - string
                                    - 'null'
                                is_from_network:
                                  description: If Location is from network
                                  type: boolean
                                  readOnly: true
                                local_uuid:
                                  description: Location UUID
                                  type: string
                                  format: uuid
                                  readOnly: true
                                assets_count:
                                  description: >-
                                    Cumulative count of assets (equipment) in this location and all its descendants.
                                    Only present when `with_assets_count=true` query parameter is provided.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                associations:
                                  description: >
                                    List of ways the operator is associated with this building. Possible values are
                                    `DIRECT` (via a direct local-operator assignment), `TEAM` (via a team the operator
                                    belongs to), and `CLIENT` (via a client the operator is assigned to).
                                  type: array
                                  items:
                                    type: string
                                    enum:
                                      - DIRECT
                                      - TEAM
                                      - CLIENT
                              required:
                                - name
                                - full_name
                                - code
                                - full_code
                                - observation
                                - date_updated
                            relationships:
                              type: object
                              properties:
                                building:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - building
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                files:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - file
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                operators:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - operator
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                localOrientation:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - localOrientation
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                          required:
                            - id
                            - type
                            - attributes
                        - title: Operator
                          description: Operator model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Operator
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - operator
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                operator_id:
                                  description: ID of the Operator
                                  type: integer
                                  readOnly: true
                                operator_uuid:
                                  description: Uuid of the Operator
                                  type: string
                                  format: uuid
                                  readOnly: true
                                full_name:
                                  type: string
                                email:
                                  type: string
                                  format: email
                                phone:
                                  type:
                                    - string
                                    - 'null'
                                cellphone:
                                  type:
                                    - string
                                    - 'null'
                                account:
                                  description: Type of account which determines the access permission level.
                                  type: string
                                  enum:
                                    - admin
                                    - manager
                                    - technician
                                    - operator
                                    - reporter
                                language:
                                  type: string
                                  enum:
                                    - ar
                                    - ca
                                    - da_dk
                                    - en
                                    - es
                                    - fr_fr
                                    - pl_pl
                                    - pt_br
                                    - pt_pt
                                    - ko
                                    - zh_cn
                                    - nl_nl
                                    - de_de
                                cost_per_hour:
                                  type: number
                                  minimum: 0
                                  examples:
                                    - 10
                                warehouse_id:
                                  description: ID of the warehouse associated to the Operator by default.
                                  type: integer
                                entity_id:
                                  type: integer
                                  readOnly: true
                                timezone:
                                  description: >
                                    Valid PHP timezone identifier. See the full list here:
                                    https://www.php.net/manual/en/timezones.php.
                                  type: string
                                  examples:
                                    - Europe/Lisbon
                                is_from_network:
                                  type: boolean
                                created_at:
                                  type: string
                                  format: date-time
                                phone_country_code:
                                  type: string
                                  examples:
                                    - US
                                is_first_web_login:
                                  type:
                                    - boolean
                                    - 'null'
                                  readOnly: true
                                status:
                                  type: string
                                  enum:
                                    - WORKING
                                    - AVAILABLE
                                    - OFFLINE
                                  examples:
                                    - WORKING
                            meta:
                              type: object
                              properties:
                                custom_fields:
                                  type:
                                    - object
                                    - 'null'
                                  additionalProperties:
                                    oneOf:
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - SELECT
                                            examples:
                                              - SELECT
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                option_id:
                                                  description: The ID of the selected option
                                                  type: integer
                                                  examples:
                                                    - 123
                                                option_code:
                                                  description: The code of the selected option
                                                  type:
                                                    - string
                                                    - 'null'
                                                  examples:
                                                    - OP01
                                                value:
                                                  description: The value of the selected option
                                                  type: string
                                                  examples:
                                                    - My Option 1
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field supports selecting multiple values
                                                    type: boolean
                                                    examples:
                                                      - true
                                                  managed_by_integrations:
                                                    description: >-
                                                      Indicates if the Custom Field options are only managed by
                                                      integrations
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - TEXT
                                            examples:
                                              - TEXT
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            examples:
                                              - abc
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (Empty for Custom Fields of
                                                  type TEXT)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - BOOLEAN
                                            examples:
                                              - BOOLEAN
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - boolean
                                              - 'null'
                                            examples:
                                              - true
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (There are none for the Custom
                                                  Field Boolean type)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - RELATIONSHIP
                                            examples:
                                              - RELATIONSHIP
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                related_to_type:
                                                  description: The type of object that is selected as the Custom Field Values
                                                  type: string
                                                  enum:
                                                    - CLIENT
                                                    - CONTACT
                                                  examples:
                                                    - CLIENT
                                                related_to_id:
                                                  description: The ID of object that is selected as the Custom Field Value
                                                  type: integer
                                                  examples:
                                                    - 123
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field allows multiple selection
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  relationship_object:
                                                    description: The type of object that is selected as the Custom Field Values
                                                    type: string
                                                    enum:
                                                      - CLIENT
                                                      - CONTACT
                                                    examples:
                                                      - CLIENT
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - DATETIME
                                            examples:
                                              - DATETIME
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-12-12 12:39:00'
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_past_dates:
                                                    description: Indicates if this Custom Field support past dates
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  allow_future_dates:
                                                    description: Indicates if this Custom Field support future dates
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - NUMBER
                                            examples:
                                              - NUMBER
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - integer
                                              - 'null'
                                            examples:
                                              - 12
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  min:
                                                    description: Indicates the minimum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 1
                                                  max:
                                                    description: Indicates the maximum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 3
                                    discriminator:
                                      propertyName: field_type
                    uniqueItems: true
                  meta:
                    title: Meta
                    description: Meta model structure details
                    type: object
                    properties:
                      pagination:
                        type: object
                        properties:
                          total:
                            description: Total items.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          count:
                            description: Total items returned for the current page.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          per_page:
                            description: Maximum number of records per page.
                            type: integer
                            minimum: 1
                            default: 200
                            examples:
                              - 1
                          current_page:
                            description: Number of the current page.
                            type: integer
                            minimum: 1
                            default: 1
                          total_pages:
                            description: Number of the total pages.
                            type: integer
                            minimum: 1
                            default: 1
                        required:
                          - total
                          - count
                          - per_page
                          - current_page
                          - total_pages
                  links:
                    title: Response Links on listing operations
                    description: >-
                      Requests that return multiple items include a `links` attribute, with links related to request's
                      context.
                    type: object
                    properties:
                      self:
                        description: Current response link.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      first:
                        description: Link to the first page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      last:
                        description: Link to the previous page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      next:
                        description: Link to the next page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                    required:
                      - self
                      - first
                      - last
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /files/{relatedTo}/{relatedToId}:
    get:
      operationId: getFiles
      tags:
        - Files
      summary: List Files
      description: This endpoint allows you to list all Files related to a given Infraspeak object.
      parameters:
        - name: relatedTo
          in: path
          description: The type of relation to the file
          required: true
          schema:
            description: Type of the object related to the Files
            type: string
            enum:
              - ELEMENT
              - ELEMENT_REGISTRY
              - SCHEDULE_WORK
              - FAILURE
              - failure
              - BUILDING
              - CATEGORY
              - OPERATOR
              - operator
              - CLIENT
              - WORK
              - METERING_REGISTRY
              - REQUEST
              - SELL_ORDER
              - SUPPLIER
              - supplier
              - ORDER
              - QUOTE
              - QUOTE_REQUEST
              - quote_request
              - RECEIVED_QUOTE
              - received_quote
              - RECEIVED_QUOTE_REQUEST
              - received_quote_request
        - name: relatedToId
          in: path
          description: The ID of the related object
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      title: File
                      description: File model structure details
                      type: object
                      properties:
                        id:
                          description: ID of the File
                          type: string
                          readOnly: true
                        type:
                          description: Model type
                          type: string
                          enum:
                            - file
                          readOnly: true
                        attributes:
                          type: object
                          properties:
                            file_id:
                              description: File Id
                              type: integer
                              readOnly: true
                            file_uuid:
                              description: File UUID
                              type: string
                              readOnly: true
                            related_to:
                              description: Object which the File is related to
                              type: string
                              enum:
                                - BUILDING
                                - CATEGORY
                                - CLIENT
                                - ELEMENT
                                - ELEMENT_REGISTRY
                                - FAILURE
                                - METERING_REGISTRY
                                - OPERATOR
                                - ORDER
                                - QUOTE
                                - QUOTE_REQUEST
                                - RECEIVED_QUOTE
                                - RECEIVED_QUOTE_REQUEST
                                - REQUEST
                                - SELL_ORDER
                                - SUPPLIER
                                - SCHEDULE_WORK
                                - WORK
                                - SCHEDULED_WORK
                                - PURCHASE
                                - PURCHASE_MATERIAL_LINE
                                - PURCHASE_SERVICE_LINE
                                - SALE
                            related_to_id:
                              description: Relations Id
                              type: integer
                            related_type:
                              description: Object which the File is related to
                              type: string
                              enum:
                                - BUILDING
                                - CATEGORY
                                - CLIENT
                                - ELEMENT
                                - ELEMENT_REGISTRY
                                - FAILURE
                                - METERING_REGISTRY
                                - OPERATOR
                                - ORDER
                                - QUOTE
                                - QUOTE_REQUEST
                                - RECEIVED_QUOTE
                                - RECEIVED_QUOTE_REQUEST
                                - REQUEST
                                - SELL_ORDER
                                - SUPPLIER
                                - SCHEDULE_WORK
                                - WORK
                              readOnly: true
                            file_label_id:
                              description: File Label Id
                              type:
                                - integer
                                - 'null'
                            name:
                              description: File name
                              type: string
                              examples:
                                - my_example_file
                            thumb:
                              description: URL to the thumbnail, in case the File is an image.
                              type:
                                - string
                                - 'null'
                              readOnly: true
                            file_url:
                              description: URL to the File
                              type: string
                              format: uri
                              readOnly: true
                            description:
                              type:
                                - string
                                - 'null'
                            expire_date:
                              type:
                                - string
                                - 'null'
                              format: date-time
                              readOnly: true
                              examples:
                                - '2020-08-28T17:12:00.000Z'
                            has_reminder:
                              type: boolean
                              readOnly: true
                            file_type:
                              description: Internal type of the file
                              type: string
                              enum:
                                - cad
                                - compressed
                                - file
                                - image
                                - office
                                - other
                                - pdf
                                - signature
                                - video
                              readOnly: true
                            permission_to_technician:
                              type: boolean
                              default: true
                            permission_to_manager:
                              type: boolean
                              default: true
                            permission_to_direct:
                              type: boolean
                              default: false
                            extension:
                              type: string
                              enum:
                                - 3gp
                                - 3gpp
                                - bin
                                - bmp
                                - cad
                                - csv
                                - doc
                                - docx
                                - gif
                                - jpeg
                                - jpg
                                - kmz
                                - mov
                                - mp4
                                - odf
                                - odp
                                - pdf
                                - png
                                - ppt
                                - pptx
                                - qt
                                - rar
                                - txt
                                - xls
                                - xlsx
                                - zip
                              readOnly: true
                            network_status:
                              description: Show the network status of the file.
                              type: string
                              enum:
                                - SHARED
                                - RECEIVED
                                - NOT_SHARED
                            shared_with_supplier:
                              description: Show if the file is currently in a shared status with the supplier.
                              type: boolean
                            shared_with_client:
                              description: Show if the file is currently in a shared status with the client.
                              type: boolean
                            file_size:
                              type: integer
                              readOnly: true
                            created_at:
                              allOf:
                                - type:
                                    - string
                                    - 'null'
                                  pattern: >-
                                    ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                    ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                  examples:
                                    - '2021-07-21 18:38:00'
                              readOnly: true
                      required:
                        - id
                        - type
                        - attributes
                  meta:
                    title: Meta
                    description: Meta model structure details
                    type: object
                    properties:
                      pagination:
                        type: object
                        properties:
                          total:
                            description: Total items.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          count:
                            description: Total items returned for the current page.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          per_page:
                            description: Maximum number of records per page.
                            type: integer
                            minimum: 1
                            default: 200
                            examples:
                              - 1
                          current_page:
                            description: Number of the current page.
                            type: integer
                            minimum: 1
                            default: 1
                          total_pages:
                            description: Number of the total pages.
                            type: integer
                            minimum: 1
                            default: 1
                        required:
                          - total
                          - count
                          - per_page
                          - current_page
                          - total_pages
                  links:
                    title: Response Links on listing operations
                    description: >-
                      Requests that return multiple items include a `links` attribute, with links related to request's
                      context.
                    type: object
                    properties:
                      self:
                        description: Current response link.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      first:
                        description: Link to the first page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      last:
                        description: Link to the previous page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      next:
                        description: Link to the next page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                    required:
                      - self
                      - first
                      - last
              examples:
                Example:
                  value:
                    data:
                      - type: file
                        id: '777'
                        attributes:
                          file_id: 777
                          file_uuid: 93732758-af4d-42fa-8bd4-d1eb30db9957
                          related_to: FAILURE
                          related_to_id: 999
                          related_type: FAILURE
                          name: my_example_file
                          thumb: https://example.com/73f579e41253ce5147533663782045fa.jpg
                          file_url: https://example.com/73f579e41253ce5147533663782045fa.jpg
                          description: some image
                          has_reminder: false
                          file_type: image
                          permission_to_technician: true
                          permission_to_manager: true
                          permission_to_direct: false
                          extension: jpg
                          network_status: NOT_SHARED
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
      x-review-reasons:
        - response 400 observed in tests but not in existing spec — verify and document it
      x-spectator: true
  /locations:
    get:
      operationId: getLocations
      tags:
        - Locations
      summary: List all Locations
      description: >
        This endpoint allows you to list all Locations, including types `building`, `location-folder` and `location`.


        The query parameters described below are to be used with the
        [JQL](../../../../../../../docs/api/.markdown/1.introduction/4-parameters.md).
      parameters:
        - name: sc_search
          in: query
          description: |
            Unified search term applied against location `name` and `full_code`.
          required: false
          schema:
            type: string
          examples:
            basic:
              summary: Find locations whose name or full_code contains "floor"
              value: floor
        - name: code
          in: query
          description: Filter results by given property value
          schema:
            type: string
        - name: full_code
          in: query
          description: Filter results by given property value
          schema:
            type: string
        - name: is_real
          in: query
          description: Filter results by given property value
          schema:
            type: boolean
        - name: local_id
          in: query
          description: Filter results by given property value
          schema:
            type: string
        - name: parent_id
          in: query
          description: Filter results by given property value
          schema:
            type: string
        - name: root_parent_id
          in: query
          description: Filter results by given property value
          schema:
            type: string
        - name: s_with_assets_count
          in: query
          description: Include cumulative assets count for each location (includes all descendant locations)
          required: false
          schema:
            type: boolean
            default: false
        - name: sort
          in: query
          description: |
            Sorts the results by the specified field and direction.

            The format is `{field}{direction}` where direction is `+` for ascending and `-` for descending.
            If no direction symbol is provided, ascending order is used by default.
          required: false
          schema:
            type: string
            example: code-
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      anyOf:
                        - title: Building
                          description: Location model of type `building` structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Location
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - building
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                local_id:
                                  description: ID of the Local of type Building
                                  type: integer
                                  examples:
                                    - 1
                                name:
                                  description: Location name
                                  type: string
                                  examples:
                                    - Building Name
                                full_name:
                                  description: Names of the location's parents concatenated by hyphen with location name.
                                  type: string
                                  readOnly: true
                                  examples:
                                    - Building Full Name
                                code:
                                  description: Location code.
                                  type: string
                                  examples:
                                    - B1
                                full_code:
                                  description: Codes of the location's parents concatenated by dot with location code.
                                  type: string
                                  readOnly: true
                                  examples:
                                    - B1
                                original_full_code:
                                  description: Location original full code.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                observation:
                                  description: Additional information
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - This is a observation
                                entity_id:
                                  description: ID of the Entity
                                  type: integer
                                date_updated:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-12-03 12:45:00'
                                has_children:
                                  description: Indicates whether the location has other locations below it or not.
                                  type: boolean
                                  readOnly: true
                                  examples:
                                    - true
                                client_id:
                                  description: ID of the associated client.
                                  type: integer
                                  examples:
                                    - 1
                                local_uuid:
                                  description: UUID of the Local of type Building
                                  type: string
                                  format: uuid
                                  examples:
                                    - aaaaaaa-0000-1111-bbbbbbb
                                is_from_network:
                                  description: If Building is from network
                                  type: boolean
                                  readOnly: true
                                  examples:
                                    - false
                                assets_count:
                                  description: >-
                                    Cumulative count of assets in this building (including all nested locations). Only
                                    returned when `with_assets_count=true` query parameter is provided.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                  examples:
                                    - 5
                                matched:
                                  description: Indicates whether this building is matched.
                                  type: boolean
                                  readOnly: true
                                  examples:
                                    - false
                              required:
                                - name
                                - full_name
                                - code
                                - full_code
                                - observation
                                - date_updated
                                - has_children
                                - client_id
                            relationships:
                              type: object
                              properties:
                                files:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - file
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                operators:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - operator
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                          required:
                            - id
                            - type
                            - attributes
                        - title: Folder
                          description: Location model of type `location-folder` structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Location
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - location-folder
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                entity_id:
                                  type: integer
                                name:
                                  description: Folder name
                                  type: string
                                full_name:
                                  description: Names of the location's parents concatenated by hyphen with location name.
                                  type: string
                                  readOnly: true
                                code:
                                  description: Folder code.
                                  type: string
                                full_code:
                                  description: Codes of the Folder's parents concatenated by dot with Folder code.
                                  type: string
                                  readOnly: true
                                original_full_code:
                                  description: Location original full code.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                observation:
                                  description: Additional information
                                  type:
                                    - string
                                    - 'null'
                                date_updated:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-12-03T12:45:00.000Z'
                                parent_id:
                                  description: ID of the Folder parent.
                                  type: integer
                                root_parent_id:
                                  description: ID of the Folder root parent (of `type` equals to `building`).
                                  type: integer
                                  readOnly: true
                                is_from_network:
                                  description: If Folder is from network
                                  type: boolean
                                  readOnly: true
                                assets_count:
                                  description: >-
                                    Cumulative count of assets in this folder (including all nested locations). Only
                                    returned when `with_assets_count=true` query parameter is provided.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                  examples:
                                    - 5
                              required:
                                - name
                                - full_name
                                - code
                                - full_code
                                - observation
                                - date_updated
                            relationships:
                              type: object
                              properties:
                                building:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - building
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                          required:
                            - id
                            - type
                            - attributes
                        - title: Location
                          description: Location model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Location
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - location
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                entity_id:
                                  type: integer
                                name:
                                  description: Location name
                                  type: string
                                full_name:
                                  description: Names of the location's parents concatenated by hyphen with location name.
                                  type: string
                                  readOnly: true
                                code:
                                  description: Location code.
                                  type: string
                                full_code:
                                  description: Codes of the location's parents concatenated by dot with location code.
                                  type: string
                                  readOnly: true
                                original_full_code:
                                  description: Location original full code.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                observation:
                                  description: Additional information
                                  type:
                                    - string
                                    - 'null'
                                date_updated:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - '2020-12-03 12:45:00'
                                parent_id:
                                  description: ID of the location parent.
                                  type: integer
                                root_parent_id:
                                  description: ID of the location root parent (of `type` equals to `building`).
                                  type: integer
                                  readOnly: true
                                area:
                                  description: Location area
                                  type:
                                    - number
                                    - 'null'
                                glass_area:
                                  description: Location glass area
                                  type:
                                    - number
                                    - 'null'
                                volume:
                                  description: Location volume
                                  type:
                                    - number
                                    - 'null'
                                orientation:
                                  description: Solar orientation (North, South, West, East)
                                  type:
                                    - string
                                    - 'null'
                                is_from_network:
                                  description: If Location is from network
                                  type: boolean
                                  readOnly: true
                                local_uuid:
                                  description: Location UUID
                                  type: string
                                  format: uuid
                                  readOnly: true
                                assets_count:
                                  description: >-
                                    Cumulative count of assets (equipment) in this location and all its descendants.
                                    Only present when `with_assets_count=true` query parameter is provided.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                associations:
                                  description: >
                                    List of ways the operator is associated with this building. Possible values are
                                    `DIRECT` (via a direct local-operator assignment), `TEAM` (via a team the operator
                                    belongs to), and `CLIENT` (via a client the operator is assigned to).
                                  type: array
                                  items:
                                    type: string
                                    enum:
                                      - DIRECT
                                      - TEAM
                                      - CLIENT
                              required:
                                - name
                                - full_name
                                - code
                                - full_code
                                - observation
                                - date_updated
                            relationships:
                              type: object
                              properties:
                                building:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - building
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                files:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - file
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                operators:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - operator
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                localOrientation:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - localOrientation
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                          required:
                            - id
                            - type
                            - attributes
                  included:
                    description: List of relationships to be included
                    type: array
                    items:
                      anyOf:
                        - title: File
                          description: File model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the File
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - file
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                file_id:
                                  description: File Id
                                  type: integer
                                  readOnly: true
                                file_uuid:
                                  description: File UUID
                                  type: string
                                  readOnly: true
                                related_to:
                                  description: Object which the File is related to
                                  type: string
                                  enum:
                                    - BUILDING
                                    - CATEGORY
                                    - CLIENT
                                    - ELEMENT
                                    - ELEMENT_REGISTRY
                                    - FAILURE
                                    - METERING_REGISTRY
                                    - OPERATOR
                                    - ORDER
                                    - QUOTE
                                    - QUOTE_REQUEST
                                    - RECEIVED_QUOTE
                                    - RECEIVED_QUOTE_REQUEST
                                    - REQUEST
                                    - SELL_ORDER
                                    - SUPPLIER
                                    - SCHEDULE_WORK
                                    - WORK
                                    - SCHEDULED_WORK
                                    - PURCHASE
                                    - PURCHASE_MATERIAL_LINE
                                    - PURCHASE_SERVICE_LINE
                                    - SALE
                                related_to_id:
                                  description: Relations Id
                                  type: integer
                                related_type:
                                  description: Object which the File is related to
                                  type: string
                                  enum:
                                    - BUILDING
                                    - CATEGORY
                                    - CLIENT
                                    - ELEMENT
                                    - ELEMENT_REGISTRY
                                    - FAILURE
                                    - METERING_REGISTRY
                                    - OPERATOR
                                    - ORDER
                                    - QUOTE
                                    - QUOTE_REQUEST
                                    - RECEIVED_QUOTE
                                    - RECEIVED_QUOTE_REQUEST
                                    - REQUEST
                                    - SELL_ORDER
                                    - SUPPLIER
                                    - SCHEDULE_WORK
                                    - WORK
                                  readOnly: true
                                file_label_id:
                                  description: File Label Id
                                  type:
                                    - integer
                                    - 'null'
                                name:
                                  description: File name
                                  type: string
                                  examples:
                                    - my_example_file
                                thumb:
                                  description: URL to the thumbnail, in case the File is an image.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                file_url:
                                  description: URL to the File
                                  type: string
                                  format: uri
                                  readOnly: true
                                description:
                                  type:
                                    - string
                                    - 'null'
                                expire_date:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T17:12:00.000Z'
                                has_reminder:
                                  type: boolean
                                  readOnly: true
                                file_type:
                                  description: Internal type of the file
                                  type: string
                                  enum:
                                    - cad
                                    - compressed
                                    - file
                                    - image
                                    - office
                                    - other
                                    - pdf
                                    - signature
                                    - video
                                  readOnly: true
                                permission_to_technician:
                                  type: boolean
                                  default: true
                                permission_to_manager:
                                  type: boolean
                                  default: true
                                permission_to_direct:
                                  type: boolean
                                  default: false
                                extension:
                                  type: string
                                  enum:
                                    - 3gp
                                    - 3gpp
                                    - bin
                                    - bmp
                                    - cad
                                    - csv
                                    - doc
                                    - docx
                                    - gif
                                    - jpeg
                                    - jpg
                                    - kmz
                                    - mov
                                    - mp4
                                    - odf
                                    - odp
                                    - pdf
                                    - png
                                    - ppt
                                    - pptx
                                    - qt
                                    - rar
                                    - txt
                                    - xls
                                    - xlsx
                                    - zip
                                  readOnly: true
                                network_status:
                                  description: Show the network status of the file.
                                  type: string
                                  enum:
                                    - SHARED
                                    - RECEIVED
                                    - NOT_SHARED
                                shared_with_supplier:
                                  description: Show if the file is currently in a shared status with the supplier.
                                  type: boolean
                                shared_with_client:
                                  description: Show if the file is currently in a shared status with the client.
                                  type: boolean
                                file_size:
                                  type: integer
                                  readOnly: true
                                created_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                  readOnly: true
                          required:
                            - id
                            - type
                            - attributes
                        - title: Location
                          description: Location model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Location
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - location
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                entity_id:
                                  type: integer
                                name:
                                  description: Location name
                                  type: string
                                full_name:
                                  description: Names of the location's parents concatenated by hyphen with location name.
                                  type: string
                                  readOnly: true
                                code:
                                  description: Location code.
                                  type: string
                                full_code:
                                  description: Codes of the location's parents concatenated by dot with location code.
                                  type: string
                                  readOnly: true
                                original_full_code:
                                  description: Location original full code.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                observation:
                                  description: Additional information
                                  type:
                                    - string
                                    - 'null'
                                date_updated:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - '2020-12-03 12:45:00'
                                parent_id:
                                  description: ID of the location parent.
                                  type: integer
                                root_parent_id:
                                  description: ID of the location root parent (of `type` equals to `building`).
                                  type: integer
                                  readOnly: true
                                area:
                                  description: Location area
                                  type:
                                    - number
                                    - 'null'
                                glass_area:
                                  description: Location glass area
                                  type:
                                    - number
                                    - 'null'
                                volume:
                                  description: Location volume
                                  type:
                                    - number
                                    - 'null'
                                orientation:
                                  description: Solar orientation (North, South, West, East)
                                  type:
                                    - string
                                    - 'null'
                                is_from_network:
                                  description: If Location is from network
                                  type: boolean
                                  readOnly: true
                                local_uuid:
                                  description: Location UUID
                                  type: string
                                  format: uuid
                                  readOnly: true
                                assets_count:
                                  description: >-
                                    Cumulative count of assets (equipment) in this location and all its descendants.
                                    Only present when `with_assets_count=true` query parameter is provided.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                associations:
                                  description: >
                                    List of ways the operator is associated with this building. Possible values are
                                    `DIRECT` (via a direct local-operator assignment), `TEAM` (via a team the operator
                                    belongs to), and `CLIENT` (via a client the operator is assigned to).
                                  type: array
                                  items:
                                    type: string
                                    enum:
                                      - DIRECT
                                      - TEAM
                                      - CLIENT
                              required:
                                - name
                                - full_name
                                - code
                                - full_code
                                - observation
                                - date_updated
                            relationships:
                              type: object
                              properties:
                                building:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - building
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                files:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - file
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                operators:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - operator
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                localOrientation:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - localOrientation
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                          required:
                            - id
                            - type
                            - attributes
                        - title: Operator
                          description: Operator model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Operator
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - operator
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                operator_id:
                                  description: ID of the Operator
                                  type: integer
                                  readOnly: true
                                operator_uuid:
                                  description: Uuid of the Operator
                                  type: string
                                  format: uuid
                                  readOnly: true
                                full_name:
                                  type: string
                                email:
                                  type: string
                                  format: email
                                phone:
                                  type:
                                    - string
                                    - 'null'
                                cellphone:
                                  type:
                                    - string
                                    - 'null'
                                account:
                                  description: Type of account which determines the access permission level.
                                  type: string
                                  enum:
                                    - admin
                                    - manager
                                    - technician
                                    - operator
                                    - reporter
                                language:
                                  type: string
                                  enum:
                                    - ar
                                    - ca
                                    - da_dk
                                    - en
                                    - es
                                    - fr_fr
                                    - pl_pl
                                    - pt_br
                                    - pt_pt
                                    - ko
                                    - zh_cn
                                    - nl_nl
                                    - de_de
                                cost_per_hour:
                                  type: number
                                  minimum: 0
                                  examples:
                                    - 10
                                warehouse_id:
                                  description: ID of the warehouse associated to the Operator by default.
                                  type: integer
                                entity_id:
                                  type: integer
                                  readOnly: true
                                timezone:
                                  description: >
                                    Valid PHP timezone identifier. See the full list here:
                                    https://www.php.net/manual/en/timezones.php.
                                  type: string
                                  examples:
                                    - Europe/Lisbon
                                is_from_network:
                                  type: boolean
                                created_at:
                                  type: string
                                  format: date-time
                                phone_country_code:
                                  type: string
                                  examples:
                                    - US
                                is_first_web_login:
                                  type:
                                    - boolean
                                    - 'null'
                                  readOnly: true
                                status:
                                  type: string
                                  enum:
                                    - WORKING
                                    - AVAILABLE
                                    - OFFLINE
                                  examples:
                                    - WORKING
                            meta:
                              type: object
                              properties:
                                custom_fields:
                                  type:
                                    - object
                                    - 'null'
                                  additionalProperties:
                                    oneOf:
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - SELECT
                                            examples:
                                              - SELECT
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                option_id:
                                                  description: The ID of the selected option
                                                  type: integer
                                                  examples:
                                                    - 123
                                                option_code:
                                                  description: The code of the selected option
                                                  type:
                                                    - string
                                                    - 'null'
                                                  examples:
                                                    - OP01
                                                value:
                                                  description: The value of the selected option
                                                  type: string
                                                  examples:
                                                    - My Option 1
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field supports selecting multiple values
                                                    type: boolean
                                                    examples:
                                                      - true
                                                  managed_by_integrations:
                                                    description: >-
                                                      Indicates if the Custom Field options are only managed by
                                                      integrations
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - TEXT
                                            examples:
                                              - TEXT
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            examples:
                                              - abc
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (Empty for Custom Fields of
                                                  type TEXT)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - BOOLEAN
                                            examples:
                                              - BOOLEAN
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - boolean
                                              - 'null'
                                            examples:
                                              - true
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (There are none for the Custom
                                                  Field Boolean type)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - RELATIONSHIP
                                            examples:
                                              - RELATIONSHIP
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                related_to_type:
                                                  description: The type of object that is selected as the Custom Field Values
                                                  type: string
                                                  enum:
                                                    - CLIENT
                                                    - CONTACT
                                                  examples:
                                                    - CLIENT
                                                related_to_id:
                                                  description: The ID of object that is selected as the Custom Field Value
                                                  type: integer
                                                  examples:
                                                    - 123
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field allows multiple selection
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  relationship_object:
                                                    description: The type of object that is selected as the Custom Field Values
                                                    type: string
                                                    enum:
                                                      - CLIENT
                                                      - CONTACT
                                                    examples:
                                                      - CLIENT
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - DATETIME
                                            examples:
                                              - DATETIME
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-12-12 12:39:00'
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_past_dates:
                                                    description: Indicates if this Custom Field support past dates
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  allow_future_dates:
                                                    description: Indicates if this Custom Field support future dates
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - NUMBER
                                            examples:
                                              - NUMBER
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - integer
                                              - 'null'
                                            examples:
                                              - 12
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  min:
                                                    description: Indicates the minimum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 1
                                                  max:
                                                    description: Indicates the maximum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 3
                                    discriminator:
                                      propertyName: field_type
                    uniqueItems: true
                  meta:
                    title: Meta
                    description: Meta model structure details
                    type: object
                    properties:
                      pagination:
                        type: object
                        properties:
                          total:
                            description: Total items.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          count:
                            description: Total items returned for the current page.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          per_page:
                            description: Maximum number of records per page.
                            type: integer
                            minimum: 1
                            default: 200
                            examples:
                              - 1
                          current_page:
                            description: Number of the current page.
                            type: integer
                            minimum: 1
                            default: 1
                          total_pages:
                            description: Number of the total pages.
                            type: integer
                            minimum: 1
                            default: 1
                        required:
                          - total
                          - count
                          - per_page
                          - current_page
                          - total_pages
                  links:
                    title: Response Links on listing operations
                    description: >-
                      Requests that return multiple items include a `links` attribute, with links related to request's
                      context.
                    type: object
                    properties:
                      self:
                        description: Current response link.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      first:
                        description: Link to the first page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      last:
                        description: Link to the previous page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      next:
                        description: Link to the next page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                    required:
                      - self
                      - first
                      - last
              examples:
                Example:
                  value:
                    data:
                      - type: building
                        id: '999'
                        attributes:
                          local_id: 123
                          name: Main Building
                          full_name: Main Building
                          code: MB
                          full_code: MB
                          observation: Additional info
                          entity_id: 999
                          date_updated: '2020-12-03 12:45:00'
                          has_children: true
                          client_id: 999
                          is_from_network: false
                      - type: location-folder
                        id: '999'
                        attributes:
                          name: 1st Floor
                          full_name: Main Building - 1st Floor
                          code: 1F
                          full_code: MB.1F
                          entity_id: 999
                          date_updated: '2020-12-03 12:45:00'
                          has_children: true
                          parent_id: 999
                          root_parent_id: 999
                          is_from_network: false
                      - type: location
                        id: '999'
                        attributes:
                          name: Room 101
                          full_name: Main Building - 1st Floor - Room 101
                          code: R101
                          full_code: MB.1F.R101
                          observation: Premium room
                          entity_id: 999
                          date_updated: '2020-12-03 12:45:00'
                          parent_id: 999
                          root_parent_id: 999
                          area: 999.99
                          glass_area: 999.99
                          volume: 999.99
                          is_from_network: false
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
    post:
      operationId: createLocation
      tags:
        - Locations
      summary: Create a Location
      description: >
        This endpoint allows you to create a Location. The locations are structured as a "directory". There are 3 types
        of locations:


        - `building`: are the "root folders", the main buildings, which contain "folders" or "real locations".

        - `location-folder`: are the "folders" and "subfolders" inside the buildings, which contain "real locations".

        - `location`: are the "real locations" inside the buildings, folders or sub-folders.
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
                - description: Location payload to create a `building`
                  type: object
                  properties:
                    _type:
                      description: Location type
                      type: string
                      enum:
                        - building
                      writeOnly: true
                    name:
                      type: string
                      examples:
                        - Main Building
                    code:
                      description: Building code. Must be unique across its level.
                      type: string
                      examples:
                        - MB
                    client_id:
                      description: ID of the associated client.
                      type: integer
                    observation:
                      description: Additional information
                      type:
                        - string
                        - 'null'
                    address:
                      description: Building address
                      type:
                        - string
                        - 'null'
                      writeOnly: true
                    postal_code:
                      description: Building postal code
                      type:
                        - string
                        - 'null'
                      writeOnly: true
                    city:
                      description: Building city
                      type:
                        - string
                        - 'null'
                      writeOnly: true
                    latitude:
                      description: Building latitude
                      type:
                        - string
                        - 'null'
                      writeOnly: true
                    longitude:
                      description: Building longitude
                      type:
                        - string
                        - 'null'
                      writeOnly: true
                    operators:
                      description: A list of IDs of the operators responsible for the building.
                      type: array
                      items:
                        type: integer
                      writeOnly: true
                    teams:
                      description: A list of IDs of the teams to associate to the location.
                      type: array
                      items:
                        type: integer
                      writeOnly: true
                    suppliers:
                      description: A list of IDs of the suppliers associated to the building.
                      type: array
                      items:
                        type: integer
                      writeOnly: true
                  required:
                    - _type
                    - name
                    - code
                    - client_id
                - description: Location payload to create a `location-folder`
                  type: object
                  properties:
                    _type:
                      description: Location type
                      type: string
                      enum:
                        - location-folder
                      writeOnly: true
                    name:
                      type: string
                      examples:
                        - 1st Floor
                    code:
                      description: Folder code. Must be unique across its level.
                      type: string
                      examples:
                        - 1F
                    parent_id:
                      description: ID of the folder parent (upper level folder or building)
                      type: integer
                    observation:
                      description: Additional information
                      type:
                        - string
                        - 'null'
                  required:
                    - _type
                    - name
                    - code
                    - parent_id
                - description: Location payload for create a `location`
                  type: object
                  properties:
                    _type:
                      description: Location type
                      type: string
                      enum:
                        - location
                      writeOnly: true
                    name:
                      type: string
                      examples:
                        - Room 101
                    code:
                      description: Location code. Must be unique across its level.
                      type: string
                      examples:
                        - R101
                    parent_id:
                      description: ID of the folder parent (upper level folder or building)
                      type: integer
                    location_type_id:
                      description: ID of the location type (GET `/location-types`)
                      type: integer
                    observation:
                      description: Additional information
                      type:
                        - string
                        - 'null'
                    latitude:
                      description: Element Location latitude
                      type:
                        - string
                        - 'null'
                    longitude:
                      description: Element Location longitude
                      type:
                        - string
                        - 'null'
                    area:
                      description: Location area
                      type:
                        - number
                        - 'null'
                    glass_area:
                      description: Location glass area
                      type:
                        - number
                        - 'null'
                    volume:
                      description: Location volume
                      type:
                        - number
                        - 'null'
                    operators:
                      description: A list of IDs of the operators responsible for the location.
                      type: array
                      items:
                        type: integer
                      writeOnly: true
                    orientation:
                      description: Solar orientation (North, South, West, East)
                      type: string
                  required:
                    - _type
                    - name
                    - code
                    - parent_id
                    - location_type_id
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    oneOf:
                      - title: Building
                        description: Location model of type `building` structure details
                        type: object
                        properties:
                          id:
                            description: ID of the Location
                            type: string
                            readOnly: true
                          type:
                            description: Model type
                            type: string
                            enum:
                              - building
                            readOnly: true
                          attributes:
                            type: object
                            properties:
                              local_id:
                                description: ID of the Local of type Building
                                type: integer
                                examples:
                                  - 1
                              name:
                                description: Location name
                                type: string
                                examples:
                                  - Building Name
                              full_name:
                                description: Names of the location's parents concatenated by hyphen with location name.
                                type: string
                                readOnly: true
                                examples:
                                  - Building Full Name
                              code:
                                description: Location code.
                                type: string
                                examples:
                                  - B1
                              full_code:
                                description: Codes of the location's parents concatenated by dot with location code.
                                type: string
                                readOnly: true
                                examples:
                                  - B1
                              original_full_code:
                                description: Location original full code.
                                type:
                                  - string
                                  - 'null'
                                readOnly: true
                              observation:
                                description: Additional information
                                type:
                                  - string
                                  - 'null'
                                examples:
                                  - This is a observation
                              entity_id:
                                description: ID of the Entity
                                type: integer
                              date_updated:
                                type:
                                  - string
                                  - 'null'
                                format: date-time
                                readOnly: true
                                examples:
                                  - '2020-12-03 12:45:00'
                              has_children:
                                description: Indicates whether the location has other locations below it or not.
                                type: boolean
                                readOnly: true
                                examples:
                                  - true
                              client_id:
                                description: ID of the associated client.
                                type: integer
                                examples:
                                  - 1
                              local_uuid:
                                description: UUID of the Local of type Building
                                type: string
                                format: uuid
                                examples:
                                  - aaaaaaa-0000-1111-bbbbbbb
                              is_from_network:
                                description: If Building is from network
                                type: boolean
                                readOnly: true
                                examples:
                                  - false
                              assets_count:
                                description: >-
                                  Cumulative count of assets in this building (including all nested locations). Only
                                  returned when `with_assets_count=true` query parameter is provided.
                                type:
                                  - integer
                                  - 'null'
                                readOnly: true
                                examples:
                                  - 5
                              matched:
                                description: Indicates whether this building is matched.
                                type: boolean
                                readOnly: true
                                examples:
                                  - false
                            required:
                              - name
                              - full_name
                              - code
                              - full_code
                              - observation
                              - date_updated
                              - has_children
                              - client_id
                          relationships:
                            type: object
                            properties:
                              files:
                                type: object
                                properties:
                                  data:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - file
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                              operators:
                                type: object
                                properties:
                                  data:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                        required:
                          - id
                          - type
                          - attributes
                      - title: Folder
                        description: Location model of type `location-folder` structure details
                        type: object
                        properties:
                          id:
                            description: ID of the Location
                            type: string
                            readOnly: true
                          type:
                            description: Model type
                            type: string
                            enum:
                              - location-folder
                            readOnly: true
                          attributes:
                            type: object
                            properties:
                              entity_id:
                                type: integer
                              name:
                                description: Folder name
                                type: string
                              full_name:
                                description: Names of the location's parents concatenated by hyphen with location name.
                                type: string
                                readOnly: true
                              code:
                                description: Folder code.
                                type: string
                              full_code:
                                description: Codes of the Folder's parents concatenated by dot with Folder code.
                                type: string
                                readOnly: true
                              original_full_code:
                                description: Location original full code.
                                type:
                                  - string
                                  - 'null'
                                readOnly: true
                              observation:
                                description: Additional information
                                type:
                                  - string
                                  - 'null'
                              date_updated:
                                type:
                                  - string
                                  - 'null'
                                format: date-time
                                readOnly: true
                                examples:
                                  - '2020-12-03T12:45:00.000Z'
                              parent_id:
                                description: ID of the Folder parent.
                                type: integer
                              root_parent_id:
                                description: ID of the Folder root parent (of `type` equals to `building`).
                                type: integer
                                readOnly: true
                              is_from_network:
                                description: If Folder is from network
                                type: boolean
                                readOnly: true
                              assets_count:
                                description: >-
                                  Cumulative count of assets in this folder (including all nested locations). Only
                                  returned when `with_assets_count=true` query parameter is provided.
                                type:
                                  - integer
                                  - 'null'
                                readOnly: true
                                examples:
                                  - 5
                            required:
                              - name
                              - full_name
                              - code
                              - full_code
                              - observation
                              - date_updated
                          relationships:
                            type: object
                            properties:
                              building:
                                type: object
                                properties:
                                  data:
                                    type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - building
                                        readOnly: true
                                      id:
                                        type: string
                                        readOnly: true
                        required:
                          - id
                          - type
                          - attributes
                      - title: Location
                        description: Location model structure details
                        type: object
                        properties:
                          id:
                            description: ID of the Location
                            type: string
                            readOnly: true
                          type:
                            description: Model type
                            type: string
                            enum:
                              - location
                            readOnly: true
                          attributes:
                            type: object
                            properties:
                              entity_id:
                                type: integer
                              name:
                                description: Location name
                                type: string
                              full_name:
                                description: Names of the location's parents concatenated by hyphen with location name.
                                type: string
                                readOnly: true
                              code:
                                description: Location code.
                                type: string
                              full_code:
                                description: Codes of the location's parents concatenated by dot with location code.
                                type: string
                                readOnly: true
                              original_full_code:
                                description: Location original full code.
                                type:
                                  - string
                                  - 'null'
                                readOnly: true
                              observation:
                                description: Additional information
                                type:
                                  - string
                                  - 'null'
                              date_updated:
                                allOf:
                                  - type:
                                      - string
                                      - 'null'
                                    pattern: >-
                                      ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                      ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                    examples:
                                      - '2021-07-21 18:38:00'
                                  - type:
                                      - string
                                      - 'null'
                                    readOnly: true
                                    examples:
                                      - '2020-12-03 12:45:00'
                              parent_id:
                                description: ID of the location parent.
                                type: integer
                              root_parent_id:
                                description: ID of the location root parent (of `type` equals to `building`).
                                type: integer
                                readOnly: true
                              area:
                                description: Location area
                                type:
                                  - number
                                  - 'null'
                              glass_area:
                                description: Location glass area
                                type:
                                  - number
                                  - 'null'
                              volume:
                                description: Location volume
                                type:
                                  - number
                                  - 'null'
                              orientation:
                                description: Solar orientation (North, South, West, East)
                                type:
                                  - string
                                  - 'null'
                              is_from_network:
                                description: If Location is from network
                                type: boolean
                                readOnly: true
                              local_uuid:
                                description: Location UUID
                                type: string
                                format: uuid
                                readOnly: true
                              assets_count:
                                description: >-
                                  Cumulative count of assets (equipment) in this location and all its descendants. Only
                                  present when `with_assets_count=true` query parameter is provided.
                                type:
                                  - integer
                                  - 'null'
                                readOnly: true
                              associations:
                                description: >
                                  List of ways the operator is associated with this building. Possible values are
                                  `DIRECT` (via a direct local-operator assignment), `TEAM` (via a team the operator
                                  belongs to), and `CLIENT` (via a client the operator is assigned to).
                                type: array
                                items:
                                  type: string
                                  enum:
                                    - DIRECT
                                    - TEAM
                                    - CLIENT
                            required:
                              - name
                              - full_name
                              - code
                              - full_code
                              - observation
                              - date_updated
                          relationships:
                            type: object
                            properties:
                              building:
                                type: object
                                properties:
                                  data:
                                    type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - building
                                        readOnly: true
                                      id:
                                        type: string
                                        readOnly: true
                              files:
                                type: object
                                properties:
                                  data:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - file
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                              operators:
                                type: object
                                properties:
                                  data:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                              localOrientation:
                                type: object
                                properties:
                                  data:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - localOrientation
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                        required:
                          - id
                          - type
                          - attributes
              examples:
                Building:
                  value:
                    data:
                      type: building
                      id: '999'
                      attributes:
                        local_id: 123
                        name: Main Building
                        full_name: Main Building
                        code: MB
                        full_code: MB
                        observation: Additional info
                        entity_id: 999
                        date_updated: '2020-12-03 12:45:00'
                        has_children: true
                        client_id: 999
                        is_from_network: false
                Folder:
                  value:
                    data:
                      type: location-folder
                      id: '999'
                      attributes:
                        name: 1st Floor
                        full_name: Main Building - 1st Floor
                        code: 1F
                        full_code: MB.1F
                        entity_id: 999
                        date_updated: '2020-12-03 12:45:00'
                        has_children: true
                        parent_id: 999
                        root_parent_id: 999
                        is_from_network: false
                Location:
                  value:
                    data:
                      type: location
                      id: '999'
                      attributes:
                        name: Room 101
                        full_name: Main Building - 1st Floor - Room 101
                        code: R101
                        full_code: MB.1F.R101
                        observation: Premium room
                        entity_id: 999
                        date_updated: '2020-12-03 12:45:00'
                        parent_id: 999
                        root_parent_id: 999
                        area: 999.99
                        glass_area: 999.99
                        volume: 999.99
                        is_from_network: false
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
    patch:
      operationId: updateMultipleLocations
      tags:
        - Locations
      summary: Update Multiple Locations
      description: |
        This endpoint allows you to update several Locations base parameters (no relationship changes allowed).
        Have in mind that there is a max limit of 50 locations per request
      requestBody:
        content:
          application/json:
            schema:
              description: Location payload for update multiple locations
              type: object
              properties:
                locations:
                  description: An array of locations to update
                  type: array
                  items:
                    type: object
                    properties:
                      location_id:
                        description: Id of Location to be updated
                        type: integer
                        readOnly: true
                      name:
                        type:
                          - string
                          - 'null'
                        examples:
                          - Room 101
                      code:
                        description: Location code. Must be unique across its level.
                        type:
                          - string
                          - 'null'
                        examples:
                          - R101
                      observation:
                        description: Additional information
                        type:
                          - string
                          - 'null'
                      latitude:
                        description: Element Location latitude
                        type:
                          - number
                          - 'null'
                      longitude:
                        description: Element Location longitude
                        type:
                          - number
                          - 'null'
                      area:
                        description: Location area
                        type:
                          - number
                          - 'null'
                      glass_area:
                        description: Location glass area
                        type:
                          - number
                          - 'null'
                      volume:
                        description: Location volume
                        type:
                          - number
                          - 'null'
                      orientation:
                        description: Solar orientation (North, South, West, East)
                        type:
                          - string
                          - 'null'
                    required:
                      - location_id
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      anyOf:
                        - title: Location
                          description: Location model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Location
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - location
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                entity_id:
                                  type: integer
                                name:
                                  description: Location name
                                  type: string
                                full_name:
                                  description: Names of the location's parents concatenated by hyphen with location name.
                                  type: string
                                  readOnly: true
                                code:
                                  description: Location code.
                                  type: string
                                full_code:
                                  description: Codes of the location's parents concatenated by dot with location code.
                                  type: string
                                  readOnly: true
                                original_full_code:
                                  description: Location original full code.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                observation:
                                  description: Additional information
                                  type:
                                    - string
                                    - 'null'
                                date_updated:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - '2020-12-03 12:45:00'
                                parent_id:
                                  description: ID of the location parent.
                                  type: integer
                                root_parent_id:
                                  description: ID of the location root parent (of `type` equals to `building`).
                                  type: integer
                                  readOnly: true
                                area:
                                  description: Location area
                                  type:
                                    - number
                                    - 'null'
                                glass_area:
                                  description: Location glass area
                                  type:
                                    - number
                                    - 'null'
                                volume:
                                  description: Location volume
                                  type:
                                    - number
                                    - 'null'
                                orientation:
                                  description: Solar orientation (North, South, West, East)
                                  type:
                                    - string
                                    - 'null'
                                is_from_network:
                                  description: If Location is from network
                                  type: boolean
                                  readOnly: true
                                local_uuid:
                                  description: Location UUID
                                  type: string
                                  format: uuid
                                  readOnly: true
                                assets_count:
                                  description: >-
                                    Cumulative count of assets (equipment) in this location and all its descendants.
                                    Only present when `with_assets_count=true` query parameter is provided.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                associations:
                                  description: >
                                    List of ways the operator is associated with this building. Possible values are
                                    `DIRECT` (via a direct local-operator assignment), `TEAM` (via a team the operator
                                    belongs to), and `CLIENT` (via a client the operator is assigned to).
                                  type: array
                                  items:
                                    type: string
                                    enum:
                                      - DIRECT
                                      - TEAM
                                      - CLIENT
                              required:
                                - name
                                - full_name
                                - code
                                - full_code
                                - observation
                                - date_updated
                            relationships:
                              type: object
                              properties:
                                building:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - building
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                files:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - file
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                operators:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - operator
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                localOrientation:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - localOrientation
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                          required:
                            - id
                            - type
                            - attributes
                        - title: Folder
                          description: Location model of type `location-folder` structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Location
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - location-folder
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                entity_id:
                                  type: integer
                                name:
                                  description: Folder name
                                  type: string
                                full_name:
                                  description: Names of the location's parents concatenated by hyphen with location name.
                                  type: string
                                  readOnly: true
                                code:
                                  description: Folder code.
                                  type: string
                                full_code:
                                  description: Codes of the Folder's parents concatenated by dot with Folder code.
                                  type: string
                                  readOnly: true
                                original_full_code:
                                  description: Location original full code.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                observation:
                                  description: Additional information
                                  type:
                                    - string
                                    - 'null'
                                date_updated:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-12-03T12:45:00.000Z'
                                parent_id:
                                  description: ID of the Folder parent.
                                  type: integer
                                root_parent_id:
                                  description: ID of the Folder root parent (of `type` equals to `building`).
                                  type: integer
                                  readOnly: true
                                is_from_network:
                                  description: If Folder is from network
                                  type: boolean
                                  readOnly: true
                                assets_count:
                                  description: >-
                                    Cumulative count of assets in this folder (including all nested locations). Only
                                    returned when `with_assets_count=true` query parameter is provided.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                  examples:
                                    - 5
                              required:
                                - name
                                - full_name
                                - code
                                - full_code
                                - observation
                                - date_updated
                            relationships:
                              type: object
                              properties:
                                building:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - building
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                          required:
                            - id
                            - type
                            - attributes
                  included:
                    description: List of relationships to be included
                    type: array
                    items:
                      anyOf:
                        - title: Location
                          description: Location model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Location
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - location
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                entity_id:
                                  type: integer
                                name:
                                  description: Location name
                                  type: string
                                full_name:
                                  description: Names of the location's parents concatenated by hyphen with location name.
                                  type: string
                                  readOnly: true
                                code:
                                  description: Location code.
                                  type: string
                                full_code:
                                  description: Codes of the location's parents concatenated by dot with location code.
                                  type: string
                                  readOnly: true
                                original_full_code:
                                  description: Location original full code.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                observation:
                                  description: Additional information
                                  type:
                                    - string
                                    - 'null'
                                date_updated:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - '2020-12-03 12:45:00'
                                parent_id:
                                  description: ID of the location parent.
                                  type: integer
                                root_parent_id:
                                  description: ID of the location root parent (of `type` equals to `building`).
                                  type: integer
                                  readOnly: true
                                area:
                                  description: Location area
                                  type:
                                    - number
                                    - 'null'
                                glass_area:
                                  description: Location glass area
                                  type:
                                    - number
                                    - 'null'
                                volume:
                                  description: Location volume
                                  type:
                                    - number
                                    - 'null'
                                orientation:
                                  description: Solar orientation (North, South, West, East)
                                  type:
                                    - string
                                    - 'null'
                                is_from_network:
                                  description: If Location is from network
                                  type: boolean
                                  readOnly: true
                                local_uuid:
                                  description: Location UUID
                                  type: string
                                  format: uuid
                                  readOnly: true
                                assets_count:
                                  description: >-
                                    Cumulative count of assets (equipment) in this location and all its descendants.
                                    Only present when `with_assets_count=true` query parameter is provided.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                associations:
                                  description: >
                                    List of ways the operator is associated with this building. Possible values are
                                    `DIRECT` (via a direct local-operator assignment), `TEAM` (via a team the operator
                                    belongs to), and `CLIENT` (via a client the operator is assigned to).
                                  type: array
                                  items:
                                    type: string
                                    enum:
                                      - DIRECT
                                      - TEAM
                                      - CLIENT
                              required:
                                - name
                                - full_name
                                - code
                                - full_code
                                - observation
                                - date_updated
                            relationships:
                              type: object
                              properties:
                                building:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - building
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                files:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - file
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                operators:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - operator
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                localOrientation:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - localOrientation
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                          required:
                            - id
                            - type
                            - attributes
                    uniqueItems: true
                  meta:
                    title: Meta
                    description: Meta model structure details
                    type: object
                    properties:
                      pagination:
                        type: object
                        properties:
                          total:
                            description: Total items.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          count:
                            description: Total items returned for the current page.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          per_page:
                            description: Maximum number of records per page.
                            type: integer
                            minimum: 1
                            default: 200
                            examples:
                              - 1
                          current_page:
                            description: Number of the current page.
                            type: integer
                            minimum: 1
                            default: 1
                          total_pages:
                            description: Number of the total pages.
                            type: integer
                            minimum: 1
                            default: 1
                        required:
                          - total
                          - count
                          - per_page
                          - current_page
                          - total_pages
                  links:
                    title: Response Links on listing operations
                    description: >-
                      Requests that return multiple items include a `links` attribute, with links related to request's
                      context.
                    type: object
                    properties:
                      self:
                        description: Current response link.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      first:
                        description: Link to the first page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      last:
                        description: Link to the previous page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      next:
                        description: Link to the next page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                    required:
                      - self
                      - first
                      - last
              examples:
                Example:
                  value:
                    data:
                      - type: location-folder
                        id: '999'
                        attributes:
                          name: 1st Floor
                          full_name: Main Building - 1st Floor
                          code: 1F
                          full_code: MB.1F
                          entity_id: 999
                          date_updated: '2020-12-03 12:45:00'
                          has_children: true
                          parent_id: 999
                          root_parent_id: 999
                          is_from_network: false
                      - type: location
                        id: '999'
                        attributes:
                          name: Room 101
                          full_name: Main Building - 1st Floor - Room 101
                          code: R101
                          full_code: MB.1F.R101
                          observation: Premium room
                          entity_id: 999
                          date_updated: '2020-12-03 12:45:00'
                          parent_id: 999
                          root_parent_id: 999
                          area: 999.99
                          glass_area: 999.99
                          volume: 999.99
                          is_from_network: false
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /locations/buildings:
    get:
      operationId: getLocationsBuildings
      tags:
        - Locations
      summary: List all Locations of type `building`
      description: >
        This endpoint allows you to list all Locations of type `building`.


        The query parameters described below are to be used with the
        [JQL](../../../../../../../docs/api/.markdown/1.introduction/4-parameters.md).
      parameters:
        - name: filter[client_id]
          in: query
          description: Filter buildings by client ID. Only returns buildings that belong to the specified client.
          required: false
          schema:
            type: integer
        - name: with_assets_count
          in: query
          description: Include cumulative assets count for each location (includes all descendant locations)
          schema:
            type: boolean
            default: false
        - name: sort
          in: query
          description: |
            Sorts the results by the specified field and direction.

            The format is `{field}{direction}` where direction is `+` for ascending and `-` for descending.
            If no direction symbol is provided, ascending order is used by default.
          required: false
          schema:
            type: string
            example: code-
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      title: Building
                      description: Location model of type `building` structure details
                      type: object
                      properties:
                        id:
                          description: ID of the Location
                          type: string
                          readOnly: true
                        type:
                          description: Model type
                          type: string
                          enum:
                            - building
                          readOnly: true
                        attributes:
                          type: object
                          properties:
                            local_id:
                              description: ID of the Local of type Building
                              type: integer
                              examples:
                                - 1
                            name:
                              description: Location name
                              type: string
                              examples:
                                - Building Name
                            full_name:
                              description: Names of the location's parents concatenated by hyphen with location name.
                              type: string
                              readOnly: true
                              examples:
                                - Building Full Name
                            code:
                              description: Location code.
                              type: string
                              examples:
                                - B1
                            full_code:
                              description: Codes of the location's parents concatenated by dot with location code.
                              type: string
                              readOnly: true
                              examples:
                                - B1
                            original_full_code:
                              description: Location original full code.
                              type:
                                - string
                                - 'null'
                              readOnly: true
                            observation:
                              description: Additional information
                              type:
                                - string
                                - 'null'
                              examples:
                                - This is a observation
                            entity_id:
                              description: ID of the Entity
                              type: integer
                            date_updated:
                              type:
                                - string
                                - 'null'
                              format: date-time
                              readOnly: true
                              examples:
                                - '2020-12-03 12:45:00'
                            has_children:
                              description: Indicates whether the location has other locations below it or not.
                              type: boolean
                              readOnly: true
                              examples:
                                - true
                            client_id:
                              description: ID of the associated client.
                              type: integer
                              examples:
                                - 1
                            local_uuid:
                              description: UUID of the Local of type Building
                              type: string
                              format: uuid
                              examples:
                                - aaaaaaa-0000-1111-bbbbbbb
                            is_from_network:
                              description: If Building is from network
                              type: boolean
                              readOnly: true
                              examples:
                                - false
                            assets_count:
                              description: >-
                                Cumulative count of assets in this building (including all nested locations). Only
                                returned when `with_assets_count=true` query parameter is provided.
                              type:
                                - integer
                                - 'null'
                              readOnly: true
                              examples:
                                - 5
                            matched:
                              description: Indicates whether this building is matched.
                              type: boolean
                              readOnly: true
                              examples:
                                - false
                          required:
                            - name
                            - full_name
                            - code
                            - full_code
                            - observation
                            - date_updated
                            - has_children
                            - client_id
                        relationships:
                          type: object
                          properties:
                            files:
                              type: object
                              properties:
                                data:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - file
                                        readOnly: true
                                      id:
                                        type: string
                                        readOnly: true
                            operators:
                              type: object
                              properties:
                                data:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - operator
                                        readOnly: true
                                      id:
                                        type: string
                                        readOnly: true
                      required:
                        - id
                        - type
                        - attributes
                  included:
                    description: List of relationships to be included
                    type: array
                    items:
                      anyOf:
                        - title: Operator
                          description: Operator model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Operator
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - operator
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                operator_id:
                                  description: ID of the Operator
                                  type: integer
                                  readOnly: true
                                operator_uuid:
                                  description: Uuid of the Operator
                                  type: string
                                  format: uuid
                                  readOnly: true
                                full_name:
                                  type: string
                                email:
                                  type: string
                                  format: email
                                phone:
                                  type:
                                    - string
                                    - 'null'
                                cellphone:
                                  type:
                                    - string
                                    - 'null'
                                account:
                                  description: Type of account which determines the access permission level.
                                  type: string
                                  enum:
                                    - admin
                                    - manager
                                    - technician
                                    - operator
                                    - reporter
                                language:
                                  type: string
                                  enum:
                                    - ar
                                    - ca
                                    - da_dk
                                    - en
                                    - es
                                    - fr_fr
                                    - pl_pl
                                    - pt_br
                                    - pt_pt
                                    - ko
                                    - zh_cn
                                    - nl_nl
                                    - de_de
                                cost_per_hour:
                                  type: number
                                  minimum: 0
                                  examples:
                                    - 10
                                warehouse_id:
                                  description: ID of the warehouse associated to the Operator by default.
                                  type: integer
                                entity_id:
                                  type: integer
                                  readOnly: true
                                timezone:
                                  description: >
                                    Valid PHP timezone identifier. See the full list here:
                                    https://www.php.net/manual/en/timezones.php.
                                  type: string
                                  examples:
                                    - Europe/Lisbon
                                is_from_network:
                                  type: boolean
                                created_at:
                                  type: string
                                  format: date-time
                                phone_country_code:
                                  type: string
                                  examples:
                                    - US
                                is_first_web_login:
                                  type:
                                    - boolean
                                    - 'null'
                                  readOnly: true
                                status:
                                  type: string
                                  enum:
                                    - WORKING
                                    - AVAILABLE
                                    - OFFLINE
                                  examples:
                                    - WORKING
                            meta:
                              type: object
                              properties:
                                custom_fields:
                                  type:
                                    - object
                                    - 'null'
                                  additionalProperties:
                                    oneOf:
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - SELECT
                                            examples:
                                              - SELECT
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                option_id:
                                                  description: The ID of the selected option
                                                  type: integer
                                                  examples:
                                                    - 123
                                                option_code:
                                                  description: The code of the selected option
                                                  type:
                                                    - string
                                                    - 'null'
                                                  examples:
                                                    - OP01
                                                value:
                                                  description: The value of the selected option
                                                  type: string
                                                  examples:
                                                    - My Option 1
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field supports selecting multiple values
                                                    type: boolean
                                                    examples:
                                                      - true
                                                  managed_by_integrations:
                                                    description: >-
                                                      Indicates if the Custom Field options are only managed by
                                                      integrations
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - TEXT
                                            examples:
                                              - TEXT
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            examples:
                                              - abc
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (Empty for Custom Fields of
                                                  type TEXT)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - BOOLEAN
                                            examples:
                                              - BOOLEAN
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - boolean
                                              - 'null'
                                            examples:
                                              - true
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (There are none for the Custom
                                                  Field Boolean type)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - RELATIONSHIP
                                            examples:
                                              - RELATIONSHIP
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                related_to_type:
                                                  description: The type of object that is selected as the Custom Field Values
                                                  type: string
                                                  enum:
                                                    - CLIENT
                                                    - CONTACT
                                                  examples:
                                                    - CLIENT
                                                related_to_id:
                                                  description: The ID of object that is selected as the Custom Field Value
                                                  type: integer
                                                  examples:
                                                    - 123
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field allows multiple selection
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  relationship_object:
                                                    description: The type of object that is selected as the Custom Field Values
                                                    type: string
                                                    enum:
                                                      - CLIENT
                                                      - CONTACT
                                                    examples:
                                                      - CLIENT
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - DATETIME
                                            examples:
                                              - DATETIME
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-12-12 12:39:00'
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_past_dates:
                                                    description: Indicates if this Custom Field support past dates
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  allow_future_dates:
                                                    description: Indicates if this Custom Field support future dates
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - NUMBER
                                            examples:
                                              - NUMBER
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - integer
                                              - 'null'
                                            examples:
                                              - 12
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  min:
                                                    description: Indicates the minimum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 1
                                                  max:
                                                    description: Indicates the maximum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 3
                                    discriminator:
                                      propertyName: field_type
                        - title: File
                          description: File model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the File
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - file
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                file_id:
                                  description: File Id
                                  type: integer
                                  readOnly: true
                                file_uuid:
                                  description: File UUID
                                  type: string
                                  readOnly: true
                                related_to:
                                  description: Object which the File is related to
                                  type: string
                                  enum:
                                    - BUILDING
                                    - CATEGORY
                                    - CLIENT
                                    - ELEMENT
                                    - ELEMENT_REGISTRY
                                    - FAILURE
                                    - METERING_REGISTRY
                                    - OPERATOR
                                    - ORDER
                                    - QUOTE
                                    - QUOTE_REQUEST
                                    - RECEIVED_QUOTE
                                    - RECEIVED_QUOTE_REQUEST
                                    - REQUEST
                                    - SELL_ORDER
                                    - SUPPLIER
                                    - SCHEDULE_WORK
                                    - WORK
                                    - SCHEDULED_WORK
                                    - PURCHASE
                                    - PURCHASE_MATERIAL_LINE
                                    - PURCHASE_SERVICE_LINE
                                    - SALE
                                related_to_id:
                                  description: Relations Id
                                  type: integer
                                related_type:
                                  description: Object which the File is related to
                                  type: string
                                  enum:
                                    - BUILDING
                                    - CATEGORY
                                    - CLIENT
                                    - ELEMENT
                                    - ELEMENT_REGISTRY
                                    - FAILURE
                                    - METERING_REGISTRY
                                    - OPERATOR
                                    - ORDER
                                    - QUOTE
                                    - QUOTE_REQUEST
                                    - RECEIVED_QUOTE
                                    - RECEIVED_QUOTE_REQUEST
                                    - REQUEST
                                    - SELL_ORDER
                                    - SUPPLIER
                                    - SCHEDULE_WORK
                                    - WORK
                                  readOnly: true
                                file_label_id:
                                  description: File Label Id
                                  type:
                                    - integer
                                    - 'null'
                                name:
                                  description: File name
                                  type: string
                                  examples:
                                    - my_example_file
                                thumb:
                                  description: URL to the thumbnail, in case the File is an image.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                file_url:
                                  description: URL to the File
                                  type: string
                                  format: uri
                                  readOnly: true
                                description:
                                  type:
                                    - string
                                    - 'null'
                                expire_date:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T17:12:00.000Z'
                                has_reminder:
                                  type: boolean
                                  readOnly: true
                                file_type:
                                  description: Internal type of the file
                                  type: string
                                  enum:
                                    - cad
                                    - compressed
                                    - file
                                    - image
                                    - office
                                    - other
                                    - pdf
                                    - signature
                                    - video
                                  readOnly: true
                                permission_to_technician:
                                  type: boolean
                                  default: true
                                permission_to_manager:
                                  type: boolean
                                  default: true
                                permission_to_direct:
                                  type: boolean
                                  default: false
                                extension:
                                  type: string
                                  enum:
                                    - 3gp
                                    - 3gpp
                                    - bin
                                    - bmp
                                    - cad
                                    - csv
                                    - doc
                                    - docx
                                    - gif
                                    - jpeg
                                    - jpg
                                    - kmz
                                    - mov
                                    - mp4
                                    - odf
                                    - odp
                                    - pdf
                                    - png
                                    - ppt
                                    - pptx
                                    - qt
                                    - rar
                                    - txt
                                    - xls
                                    - xlsx
                                    - zip
                                  readOnly: true
                                network_status:
                                  description: Show the network status of the file.
                                  type: string
                                  enum:
                                    - SHARED
                                    - RECEIVED
                                    - NOT_SHARED
                                shared_with_supplier:
                                  description: Show if the file is currently in a shared status with the supplier.
                                  type: boolean
                                shared_with_client:
                                  description: Show if the file is currently in a shared status with the client.
                                  type: boolean
                                file_size:
                                  type: integer
                                  readOnly: true
                                created_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                  readOnly: true
                          required:
                            - id
                            - type
                            - attributes
                    uniqueItems: true
                  meta:
                    title: Meta
                    description: Meta model structure details
                    type: object
                    properties:
                      pagination:
                        type: object
                        properties:
                          total:
                            description: Total items.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          count:
                            description: Total items returned for the current page.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          per_page:
                            description: Maximum number of records per page.
                            type: integer
                            minimum: 1
                            default: 200
                            examples:
                              - 1
                          current_page:
                            description: Number of the current page.
                            type: integer
                            minimum: 1
                            default: 1
                          total_pages:
                            description: Number of the total pages.
                            type: integer
                            minimum: 1
                            default: 1
                        required:
                          - total
                          - count
                          - per_page
                          - current_page
                          - total_pages
                  links:
                    title: Response Links on listing operations
                    description: >-
                      Requests that return multiple items include a `links` attribute, with links related to request's
                      context.
                    type: object
                    properties:
                      self:
                        description: Current response link.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      first:
                        description: Link to the first page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      last:
                        description: Link to the previous page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      next:
                        description: Link to the next page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                    required:
                      - self
                      - first
                      - last
              examples:
                Example:
                  value:
                    data:
                      - type: building
                        id: '999'
                        attributes:
                          local_id: 123
                          name: Main Building
                          full_name: Main Building
                          code: MB
                          full_code: MB
                          observation: Additional info
                          entity_id: 999
                          date_updated: '2020-12-03 12:45:00'
                          has_children: true
                          client_id: 999
                          is_from_network: false
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
    post:
      operationId: duplicateBuilding
      tags:
        - Locations
      summary: Duplicate a Building
      description: |
        This endpoint allows you to duplicate a Building tree
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
                - description: Duplicate Building payload
                  type: object
                  properties:
                    name:
                      type: string
                      examples:
                        - Building Name
                    code:
                      description: Building code. Must be unique across its level.
                      type: string
                      examples:
                        - MB
                    client_id:
                      description: ID of the associated client.
                      type: integer
                  required:
                    - name
                    - code
                    - client_id
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    oneOf:
                      - title: Building
                        description: Location model of type `building` structure details
                        type: object
                        properties:
                          id:
                            description: ID of the Location
                            type: string
                            readOnly: true
                          type:
                            description: Model type
                            type: string
                            enum:
                              - building
                            readOnly: true
                          attributes:
                            type: object
                            properties:
                              local_id:
                                description: ID of the Local of type Building
                                type: integer
                                examples:
                                  - 1
                              name:
                                description: Location name
                                type: string
                                examples:
                                  - Building Name
                              full_name:
                                description: Names of the location's parents concatenated by hyphen with location name.
                                type: string
                                readOnly: true
                                examples:
                                  - Building Full Name
                              code:
                                description: Location code.
                                type: string
                                examples:
                                  - B1
                              full_code:
                                description: Codes of the location's parents concatenated by dot with location code.
                                type: string
                                readOnly: true
                                examples:
                                  - B1
                              original_full_code:
                                description: Location original full code.
                                type:
                                  - string
                                  - 'null'
                                readOnly: true
                              observation:
                                description: Additional information
                                type:
                                  - string
                                  - 'null'
                                examples:
                                  - This is a observation
                              entity_id:
                                description: ID of the Entity
                                type: integer
                              date_updated:
                                type:
                                  - string
                                  - 'null'
                                format: date-time
                                readOnly: true
                                examples:
                                  - '2020-12-03 12:45:00'
                              has_children:
                                description: Indicates whether the location has other locations below it or not.
                                type: boolean
                                readOnly: true
                                examples:
                                  - true
                              client_id:
                                description: ID of the associated client.
                                type: integer
                                examples:
                                  - 1
                              local_uuid:
                                description: UUID of the Local of type Building
                                type: string
                                format: uuid
                                examples:
                                  - aaaaaaa-0000-1111-bbbbbbb
                              is_from_network:
                                description: If Building is from network
                                type: boolean
                                readOnly: true
                                examples:
                                  - false
                              assets_count:
                                description: >-
                                  Cumulative count of assets in this building (including all nested locations). Only
                                  returned when `with_assets_count=true` query parameter is provided.
                                type:
                                  - integer
                                  - 'null'
                                readOnly: true
                                examples:
                                  - 5
                              matched:
                                description: Indicates whether this building is matched.
                                type: boolean
                                readOnly: true
                                examples:
                                  - false
                            required:
                              - name
                              - full_name
                              - code
                              - full_code
                              - observation
                              - date_updated
                              - has_children
                              - client_id
                          relationships:
                            type: object
                            properties:
                              files:
                                type: object
                                properties:
                                  data:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - file
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                              operators:
                                type: object
                                properties:
                                  data:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                        required:
                          - id
                          - type
                          - attributes
                      - title: Folder
                        description: Location model of type `location-folder` structure details
                        type: object
                        properties:
                          id:
                            description: ID of the Location
                            type: string
                            readOnly: true
                          type:
                            description: Model type
                            type: string
                            enum:
                              - location-folder
                            readOnly: true
                          attributes:
                            type: object
                            properties:
                              entity_id:
                                type: integer
                              name:
                                description: Folder name
                                type: string
                              full_name:
                                description: Names of the location's parents concatenated by hyphen with location name.
                                type: string
                                readOnly: true
                              code:
                                description: Folder code.
                                type: string
                              full_code:
                                description: Codes of the Folder's parents concatenated by dot with Folder code.
                                type: string
                                readOnly: true
                              original_full_code:
                                description: Location original full code.
                                type:
                                  - string
                                  - 'null'
                                readOnly: true
                              observation:
                                description: Additional information
                                type:
                                  - string
                                  - 'null'
                              date_updated:
                                type:
                                  - string
                                  - 'null'
                                format: date-time
                                readOnly: true
                                examples:
                                  - '2020-12-03T12:45:00.000Z'
                              parent_id:
                                description: ID of the Folder parent.
                                type: integer
                              root_parent_id:
                                description: ID of the Folder root parent (of `type` equals to `building`).
                                type: integer
                                readOnly: true
                              is_from_network:
                                description: If Folder is from network
                                type: boolean
                                readOnly: true
                              assets_count:
                                description: >-
                                  Cumulative count of assets in this folder (including all nested locations). Only
                                  returned when `with_assets_count=true` query parameter is provided.
                                type:
                                  - integer
                                  - 'null'
                                readOnly: true
                                examples:
                                  - 5
                            required:
                              - name
                              - full_name
                              - code
                              - full_code
                              - observation
                              - date_updated
                          relationships:
                            type: object
                            properties:
                              building:
                                type: object
                                properties:
                                  data:
                                    type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - building
                                        readOnly: true
                                      id:
                                        type: string
                                        readOnly: true
                        required:
                          - id
                          - type
                          - attributes
                      - title: Location
                        description: Location model structure details
                        type: object
                        properties:
                          id:
                            description: ID of the Location
                            type: string
                            readOnly: true
                          type:
                            description: Model type
                            type: string
                            enum:
                              - location
                            readOnly: true
                          attributes:
                            type: object
                            properties:
                              entity_id:
                                type: integer
                              name:
                                description: Location name
                                type: string
                              full_name:
                                description: Names of the location's parents concatenated by hyphen with location name.
                                type: string
                                readOnly: true
                              code:
                                description: Location code.
                                type: string
                              full_code:
                                description: Codes of the location's parents concatenated by dot with location code.
                                type: string
                                readOnly: true
                              original_full_code:
                                description: Location original full code.
                                type:
                                  - string
                                  - 'null'
                                readOnly: true
                              observation:
                                description: Additional information
                                type:
                                  - string
                                  - 'null'
                              date_updated:
                                allOf:
                                  - type:
                                      - string
                                      - 'null'
                                    pattern: >-
                                      ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                      ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                    examples:
                                      - '2021-07-21 18:38:00'
                                  - type:
                                      - string
                                      - 'null'
                                    readOnly: true
                                    examples:
                                      - '2020-12-03 12:45:00'
                              parent_id:
                                description: ID of the location parent.
                                type: integer
                              root_parent_id:
                                description: ID of the location root parent (of `type` equals to `building`).
                                type: integer
                                readOnly: true
                              area:
                                description: Location area
                                type:
                                  - number
                                  - 'null'
                              glass_area:
                                description: Location glass area
                                type:
                                  - number
                                  - 'null'
                              volume:
                                description: Location volume
                                type:
                                  - number
                                  - 'null'
                              orientation:
                                description: Solar orientation (North, South, West, East)
                                type:
                                  - string
                                  - 'null'
                              is_from_network:
                                description: If Location is from network
                                type: boolean
                                readOnly: true
                              local_uuid:
                                description: Location UUID
                                type: string
                                format: uuid
                                readOnly: true
                              assets_count:
                                description: >-
                                  Cumulative count of assets (equipment) in this location and all its descendants. Only
                                  present when `with_assets_count=true` query parameter is provided.
                                type:
                                  - integer
                                  - 'null'
                                readOnly: true
                              associations:
                                description: >
                                  List of ways the operator is associated with this building. Possible values are
                                  `DIRECT` (via a direct local-operator assignment), `TEAM` (via a team the operator
                                  belongs to), and `CLIENT` (via a client the operator is assigned to).
                                type: array
                                items:
                                  type: string
                                  enum:
                                    - DIRECT
                                    - TEAM
                                    - CLIENT
                            required:
                              - name
                              - full_name
                              - code
                              - full_code
                              - observation
                              - date_updated
                          relationships:
                            type: object
                            properties:
                              building:
                                type: object
                                properties:
                                  data:
                                    type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - building
                                        readOnly: true
                                      id:
                                        type: string
                                        readOnly: true
                              files:
                                type: object
                                properties:
                                  data:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - file
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                              operators:
                                type: object
                                properties:
                                  data:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                              localOrientation:
                                type: object
                                properties:
                                  data:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - localOrientation
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                        required:
                          - id
                          - type
                          - attributes
              examples:
                Building:
                  value:
                    data:
                      type: building
                      id: '999'
                      attributes:
                        local_id: 123
                        name: Main Building
                        full_name: Main Building
                        code: MB
                        full_code: MB
                        observation: Additional info
                        entity_id: 999
                        date_updated: '2020-12-03 12:45:00'
                        has_children: true
                        client_id: 999
                        is_from_network: false
                Folder:
                  value:
                    data:
                      type: location-folder
                      id: '999'
                      attributes:
                        name: 1st Floor
                        full_name: Main Building - 1st Floor
                        code: 1F
                        full_code: MB.1F
                        entity_id: 999
                        date_updated: '2020-12-03 12:45:00'
                        has_children: true
                        parent_id: 999
                        root_parent_id: 999
                        is_from_network: false
                Location:
                  value:
                    data:
                      type: location
                      id: '999'
                      attributes:
                        name: Room 101
                        full_name: Main Building - 1st Floor - Room 101
                        code: R101
                        full_code: MB.1F.R101
                        observation: Premium room
                        entity_id: 999
                        date_updated: '2020-12-03 12:45:00'
                        parent_id: 999
                        root_parent_id: 999
                        area: 999.99
                        glass_area: 999.99
                        volume: 999.99
                        is_from_network: false
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /locations/{id}:
    get:
      operationId: getLocation
      tags:
        - Locations
      summary: Get a Location
      description: This endpoint allows you to get a specific Location.
      parameters:
        - name: id
          in: path
          description: The Location ID
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    oneOf:
                      - title: Building
                        description: Location model of type `building` structure details
                        type: object
                        properties:
                          id:
                            description: ID of the Location
                            type: string
                            readOnly: true
                          type:
                            description: Model type
                            type: string
                            enum:
                              - building
                            readOnly: true
                          attributes:
                            type: object
                            properties:
                              local_id:
                                description: ID of the Local of type Building
                                type: integer
                                examples:
                                  - 1
                              name:
                                description: Location name
                                type: string
                                examples:
                                  - Building Name
                              full_name:
                                description: Names of the location's parents concatenated by hyphen with location name.
                                type: string
                                readOnly: true
                                examples:
                                  - Building Full Name
                              code:
                                description: Location code.
                                type: string
                                examples:
                                  - B1
                              full_code:
                                description: Codes of the location's parents concatenated by dot with location code.
                                type: string
                                readOnly: true
                                examples:
                                  - B1
                              original_full_code:
                                description: Location original full code.
                                type:
                                  - string
                                  - 'null'
                                readOnly: true
                              observation:
                                description: Additional information
                                type:
                                  - string
                                  - 'null'
                                examples:
                                  - This is a observation
                              entity_id:
                                description: ID of the Entity
                                type: integer
                              date_updated:
                                type:
                                  - string
                                  - 'null'
                                format: date-time
                                readOnly: true
                                examples:
                                  - '2020-12-03 12:45:00'
                              has_children:
                                description: Indicates whether the location has other locations below it or not.
                                type: boolean
                                readOnly: true
                                examples:
                                  - true
                              client_id:
                                description: ID of the associated client.
                                type: integer
                                examples:
                                  - 1
                              local_uuid:
                                description: UUID of the Local of type Building
                                type: string
                                format: uuid
                                examples:
                                  - aaaaaaa-0000-1111-bbbbbbb
                              is_from_network:
                                description: If Building is from network
                                type: boolean
                                readOnly: true
                                examples:
                                  - false
                              assets_count:
                                description: >-
                                  Cumulative count of assets in this building (including all nested locations). Only
                                  returned when `with_assets_count=true` query parameter is provided.
                                type:
                                  - integer
                                  - 'null'
                                readOnly: true
                                examples:
                                  - 5
                              matched:
                                description: Indicates whether this building is matched.
                                type: boolean
                                readOnly: true
                                examples:
                                  - false
                            required:
                              - name
                              - full_name
                              - code
                              - full_code
                              - observation
                              - date_updated
                              - has_children
                              - client_id
                          relationships:
                            type: object
                            properties:
                              files:
                                type: object
                                properties:
                                  data:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - file
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                              operators:
                                type: object
                                properties:
                                  data:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                        required:
                          - id
                          - type
                          - attributes
                      - title: Folder
                        description: Location model of type `location-folder` structure details
                        type: object
                        properties:
                          id:
                            description: ID of the Location
                            type: string
                            readOnly: true
                          type:
                            description: Model type
                            type: string
                            enum:
                              - location-folder
                            readOnly: true
                          attributes:
                            type: object
                            properties:
                              entity_id:
                                type: integer
                              name:
                                description: Folder name
                                type: string
                              full_name:
                                description: Names of the location's parents concatenated by hyphen with location name.
                                type: string
                                readOnly: true
                              code:
                                description: Folder code.
                                type: string
                              full_code:
                                description: Codes of the Folder's parents concatenated by dot with Folder code.
                                type: string
                                readOnly: true
                              original_full_code:
                                description: Location original full code.
                                type:
                                  - string
                                  - 'null'
                                readOnly: true
                              observation:
                                description: Additional information
                                type:
                                  - string
                                  - 'null'
                              date_updated:
                                type:
                                  - string
                                  - 'null'
                                format: date-time
                                readOnly: true
                                examples:
                                  - '2020-12-03T12:45:00.000Z'
                              parent_id:
                                description: ID of the Folder parent.
                                type: integer
                              root_parent_id:
                                description: ID of the Folder root parent (of `type` equals to `building`).
                                type: integer
                                readOnly: true
                              is_from_network:
                                description: If Folder is from network
                                type: boolean
                                readOnly: true
                              assets_count:
                                description: >-
                                  Cumulative count of assets in this folder (including all nested locations). Only
                                  returned when `with_assets_count=true` query parameter is provided.
                                type:
                                  - integer
                                  - 'null'
                                readOnly: true
                                examples:
                                  - 5
                            required:
                              - name
                              - full_name
                              - code
                              - full_code
                              - observation
                              - date_updated
                          relationships:
                            type: object
                            properties:
                              building:
                                type: object
                                properties:
                                  data:
                                    type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - building
                                        readOnly: true
                                      id:
                                        type: string
                                        readOnly: true
                        required:
                          - id
                          - type
                          - attributes
                      - title: Location
                        description: Location model structure details
                        type: object
                        properties:
                          id:
                            description: ID of the Location
                            type: string
                            readOnly: true
                          type:
                            description: Model type
                            type: string
                            enum:
                              - location
                            readOnly: true
                          attributes:
                            type: object
                            properties:
                              entity_id:
                                type: integer
                              name:
                                description: Location name
                                type: string
                              full_name:
                                description: Names of the location's parents concatenated by hyphen with location name.
                                type: string
                                readOnly: true
                              code:
                                description: Location code.
                                type: string
                              full_code:
                                description: Codes of the location's parents concatenated by dot with location code.
                                type: string
                                readOnly: true
                              original_full_code:
                                description: Location original full code.
                                type:
                                  - string
                                  - 'null'
                                readOnly: true
                              observation:
                                description: Additional information
                                type:
                                  - string
                                  - 'null'
                              date_updated:
                                allOf:
                                  - type:
                                      - string
                                      - 'null'
                                    pattern: >-
                                      ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                      ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                    examples:
                                      - '2021-07-21 18:38:00'
                                  - type:
                                      - string
                                      - 'null'
                                    readOnly: true
                                    examples:
                                      - '2020-12-03 12:45:00'
                              parent_id:
                                description: ID of the location parent.
                                type: integer
                              root_parent_id:
                                description: ID of the location root parent (of `type` equals to `building`).
                                type: integer
                                readOnly: true
                              area:
                                description: Location area
                                type:
                                  - number
                                  - 'null'
                              glass_area:
                                description: Location glass area
                                type:
                                  - number
                                  - 'null'
                              volume:
                                description: Location volume
                                type:
                                  - number
                                  - 'null'
                              orientation:
                                description: Solar orientation (North, South, West, East)
                                type:
                                  - string
                                  - 'null'
                              is_from_network:
                                description: If Location is from network
                                type: boolean
                                readOnly: true
                              local_uuid:
                                description: Location UUID
                                type: string
                                format: uuid
                                readOnly: true
                              assets_count:
                                description: >-
                                  Cumulative count of assets (equipment) in this location and all its descendants. Only
                                  present when `with_assets_count=true` query parameter is provided.
                                type:
                                  - integer
                                  - 'null'
                                readOnly: true
                              associations:
                                description: >
                                  List of ways the operator is associated with this building. Possible values are
                                  `DIRECT` (via a direct local-operator assignment), `TEAM` (via a team the operator
                                  belongs to), and `CLIENT` (via a client the operator is assigned to).
                                type: array
                                items:
                                  type: string
                                  enum:
                                    - DIRECT
                                    - TEAM
                                    - CLIENT
                            required:
                              - name
                              - full_name
                              - code
                              - full_code
                              - observation
                              - date_updated
                          relationships:
                            type: object
                            properties:
                              building:
                                type: object
                                properties:
                                  data:
                                    type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - building
                                        readOnly: true
                                      id:
                                        type: string
                                        readOnly: true
                              files:
                                type: object
                                properties:
                                  data:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - file
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                              operators:
                                type: object
                                properties:
                                  data:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                              localOrientation:
                                type: object
                                properties:
                                  data:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - localOrientation
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                        required:
                          - id
                          - type
                          - attributes
              examples:
                Building:
                  value:
                    data:
                      type: building
                      id: '999'
                      attributes:
                        local_id: 123
                        name: Main Building
                        full_name: Main Building
                        code: MB
                        full_code: MB
                        observation: Additional info
                        entity_id: 999
                        date_updated: '2020-12-03 12:45:00'
                        has_children: true
                        client_id: 999
                        is_from_network: false
                Folder:
                  value:
                    data:
                      type: location-folder
                      id: '999'
                      attributes:
                        name: 1st Floor
                        full_name: Main Building - 1st Floor
                        code: 1F
                        full_code: MB.1F
                        entity_id: 999
                        date_updated: '2020-12-03 12:45:00'
                        has_children: true
                        parent_id: 999
                        root_parent_id: 999
                        is_from_network: false
                Location:
                  value:
                    data:
                      type: location
                      id: '999'
                      attributes:
                        name: Room 101
                        full_name: Main Building - 1st Floor - Room 101
                        code: R101
                        full_code: MB.1F.R101
                        observation: Premium room
                        entity_id: 999
                        date_updated: '2020-12-03 12:45:00'
                        parent_id: 999
                        root_parent_id: 999
                        area: 999.99
                        glass_area: 999.99
                        volume: 999.99
                        is_from_network: false
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
    delete:
      operationId: deleteLocation
      tags:
        - Locations
      summary: Delete a Location
      description: >
        This endpoint allows you to delete a specific Location.Default behaviour will delete locations without
        dependencies.


        You can send force=true so that locations that have dependencies will be deleted.


        Note that Locations that contain lower level active Failure or Planned Job Orders running cannot be deleted.
      parameters:
        - name: id
          in: path
          description: The Location ID
          required: true
          schema:
            type: string
        - name: force
          in: query
          description: Delete location with active dependencies
          schema:
            type: boolean
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items: {}
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '403':
          description: Forbidden. The action can not be fulfilled.
          content:
            application/json:
              schema:
                title: 403 Forbidden
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 403
                      message:
                        type: string
                        examples:
                          - Action unauthorized
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 403
                      message: Action unauthorized
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
      x-toolbox: true
    patch:
      operationId: updateLocation
      tags:
        - Locations
      summary: Update a Location
      description: >
        This endpoint allows you to update a specific Location.

        Have in mind that you cannot change a location `type`. E.g.: change a location of type `building` to
        `location-folder`.
      parameters:
        - name: id
          in: path
          description: The Location ID
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
                - description: Location payload to update a `building`
                  type: object
                  properties:
                    _type:
                      description: Location type
                      type: string
                      enum:
                        - building
                      writeOnly: true
                    name:
                      type: string
                      examples:
                        - Main Building
                    code:
                      description: Building code. Must be unique across its level.
                      type: string
                      examples:
                        - MB
                    client_id:
                      description: ID of the associated client.
                      type: integer
                    operators:
                      description: A list of IDs of the operators responsible for the building.
                      type: array
                      items:
                        type: integer
                      writeOnly: true
                    observation:
                      description: Additional information
                      type:
                        - string
                        - 'null'
                    address:
                      description: Building address
                      type:
                        - string
                        - 'null'
                      writeOnly: true
                    postal_code:
                      description: Building postal code
                      type:
                        - string
                        - 'null'
                      writeOnly: true
                    city:
                      description: Building city
                      type:
                        - string
                        - 'null'
                      writeOnly: true
                    latitude:
                      description: Building latitude
                      type:
                        - string
                        - 'null'
                      writeOnly: true
                    longitude:
                      description: Building longitude
                      type:
                        - string
                        - 'null'
                      writeOnly: true
                    activity:
                      description: Building activity
                      type:
                        - string
                        - 'null'
                      writeOnly: true
                    mean_population:
                      description: Building mean population
                      type:
                        - string
                        - 'null'
                      writeOnly: true
                    schedules_info:
                      description: Building schedules info
                      type:
                        - string
                        - 'null'
                      writeOnly: true
                    contacts:
                      type: object
                      properties:
                        data:
                          type: array
                          items:
                            type: object
                            properties:
                              type:
                                type: string
                                enum:
                                  - contact
                                readOnly: true
                              id:
                                type: string
                                readOnly: true
                    teams:
                      description: A list of IDs of the teams to associate to the location.
                      type: array
                      items:
                        type: integer
                      writeOnly: true
                  required:
                    - _type
                - description: Location payload to update a `location-folder`
                  type: object
                  properties:
                    _type:
                      description: Location type
                      type: string
                      enum:
                        - location-folder
                      writeOnly: true
                    name:
                      type: string
                      examples:
                        - 1st Floor
                    code:
                      description: Folder code. Must be unique across its level.
                      type: string
                      examples:
                        - 1F
                    observation:
                      description: Additional information
                      type:
                        - string
                        - 'null'
                    parent_id:
                      description: ID of the folder parent (upper level folder or building)
                      type: integer
                  required:
                    - _type
                - description: Location payload for update a `location`
                  type: object
                  properties:
                    _type:
                      description: Location type
                      type: string
                      enum:
                        - location
                      writeOnly: true
                    name:
                      type: string
                      examples:
                        - Room 101
                    code:
                      description: Location code. Must be unique across its level.
                      type: string
                      examples:
                        - R101
                    observation:
                      description: Additional information
                      type:
                        - string
                        - 'null'
                    parent_id:
                      description: ID of the folder parent (upper level folder or building)
                      type: integer
                    location_type_id:
                      description: ID of the location type (GET `/location-types`)
                      type: integer
                    orientation:
                      description: Solar orientation (North, South, West, East)
                      type: string
                  required:
                    - _type
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    oneOf:
                      - title: Building
                        description: Location model of type `building` structure details
                        type: object
                        properties:
                          id:
                            description: ID of the Location
                            type: string
                            readOnly: true
                          type:
                            description: Model type
                            type: string
                            enum:
                              - building
                            readOnly: true
                          attributes:
                            type: object
                            properties:
                              local_id:
                                description: ID of the Local of type Building
                                type: integer
                                examples:
                                  - 1
                              name:
                                description: Location name
                                type: string
                                examples:
                                  - Building Name
                              full_name:
                                description: Names of the location's parents concatenated by hyphen with location name.
                                type: string
                                readOnly: true
                                examples:
                                  - Building Full Name
                              code:
                                description: Location code.
                                type: string
                                examples:
                                  - B1
                              full_code:
                                description: Codes of the location's parents concatenated by dot with location code.
                                type: string
                                readOnly: true
                                examples:
                                  - B1
                              original_full_code:
                                description: Location original full code.
                                type:
                                  - string
                                  - 'null'
                                readOnly: true
                              observation:
                                description: Additional information
                                type:
                                  - string
                                  - 'null'
                                examples:
                                  - This is a observation
                              entity_id:
                                description: ID of the Entity
                                type: integer
                              date_updated:
                                type:
                                  - string
                                  - 'null'
                                format: date-time
                                readOnly: true
                                examples:
                                  - '2020-12-03 12:45:00'
                              has_children:
                                description: Indicates whether the location has other locations below it or not.
                                type: boolean
                                readOnly: true
                                examples:
                                  - true
                              client_id:
                                description: ID of the associated client.
                                type: integer
                                examples:
                                  - 1
                              local_uuid:
                                description: UUID of the Local of type Building
                                type: string
                                format: uuid
                                examples:
                                  - aaaaaaa-0000-1111-bbbbbbb
                              is_from_network:
                                description: If Building is from network
                                type: boolean
                                readOnly: true
                                examples:
                                  - false
                              assets_count:
                                description: >-
                                  Cumulative count of assets in this building (including all nested locations). Only
                                  returned when `with_assets_count=true` query parameter is provided.
                                type:
                                  - integer
                                  - 'null'
                                readOnly: true
                                examples:
                                  - 5
                              matched:
                                description: Indicates whether this building is matched.
                                type: boolean
                                readOnly: true
                                examples:
                                  - false
                            required:
                              - name
                              - full_name
                              - code
                              - full_code
                              - observation
                              - date_updated
                              - has_children
                              - client_id
                          relationships:
                            type: object
                            properties:
                              files:
                                type: object
                                properties:
                                  data:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - file
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                              operators:
                                type: object
                                properties:
                                  data:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                        required:
                          - id
                          - type
                          - attributes
                      - title: Folder
                        description: Location model of type `location-folder` structure details
                        type: object
                        properties:
                          id:
                            description: ID of the Location
                            type: string
                            readOnly: true
                          type:
                            description: Model type
                            type: string
                            enum:
                              - location-folder
                            readOnly: true
                          attributes:
                            type: object
                            properties:
                              entity_id:
                                type: integer
                              name:
                                description: Folder name
                                type: string
                              full_name:
                                description: Names of the location's parents concatenated by hyphen with location name.
                                type: string
                                readOnly: true
                              code:
                                description: Folder code.
                                type: string
                              full_code:
                                description: Codes of the Folder's parents concatenated by dot with Folder code.
                                type: string
                                readOnly: true
                              original_full_code:
                                description: Location original full code.
                                type:
                                  - string
                                  - 'null'
                                readOnly: true
                              observation:
                                description: Additional information
                                type:
                                  - string
                                  - 'null'
                              date_updated:
                                type:
                                  - string
                                  - 'null'
                                format: date-time
                                readOnly: true
                                examples:
                                  - '2020-12-03T12:45:00.000Z'
                              parent_id:
                                description: ID of the Folder parent.
                                type: integer
                              root_parent_id:
                                description: ID of the Folder root parent (of `type` equals to `building`).
                                type: integer
                                readOnly: true
                              is_from_network:
                                description: If Folder is from network
                                type: boolean
                                readOnly: true
                              assets_count:
                                description: >-
                                  Cumulative count of assets in this folder (including all nested locations). Only
                                  returned when `with_assets_count=true` query parameter is provided.
                                type:
                                  - integer
                                  - 'null'
                                readOnly: true
                                examples:
                                  - 5
                            required:
                              - name
                              - full_name
                              - code
                              - full_code
                              - observation
                              - date_updated
                          relationships:
                            type: object
                            properties:
                              building:
                                type: object
                                properties:
                                  data:
                                    type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - building
                                        readOnly: true
                                      id:
                                        type: string
                                        readOnly: true
                        required:
                          - id
                          - type
                          - attributes
                      - title: Location
                        description: Location model structure details
                        type: object
                        properties:
                          id:
                            description: ID of the Location
                            type: string
                            readOnly: true
                          type:
                            description: Model type
                            type: string
                            enum:
                              - location
                            readOnly: true
                          attributes:
                            type: object
                            properties:
                              entity_id:
                                type: integer
                              name:
                                description: Location name
                                type: string
                              full_name:
                                description: Names of the location's parents concatenated by hyphen with location name.
                                type: string
                                readOnly: true
                              code:
                                description: Location code.
                                type: string
                              full_code:
                                description: Codes of the location's parents concatenated by dot with location code.
                                type: string
                                readOnly: true
                              original_full_code:
                                description: Location original full code.
                                type:
                                  - string
                                  - 'null'
                                readOnly: true
                              observation:
                                description: Additional information
                                type:
                                  - string
                                  - 'null'
                              date_updated:
                                allOf:
                                  - type:
                                      - string
                                      - 'null'
                                    pattern: >-
                                      ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                      ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                    examples:
                                      - '2021-07-21 18:38:00'
                                  - type:
                                      - string
                                      - 'null'
                                    readOnly: true
                                    examples:
                                      - '2020-12-03 12:45:00'
                              parent_id:
                                description: ID of the location parent.
                                type: integer
                              root_parent_id:
                                description: ID of the location root parent (of `type` equals to `building`).
                                type: integer
                                readOnly: true
                              area:
                                description: Location area
                                type:
                                  - number
                                  - 'null'
                              glass_area:
                                description: Location glass area
                                type:
                                  - number
                                  - 'null'
                              volume:
                                description: Location volume
                                type:
                                  - number
                                  - 'null'
                              orientation:
                                description: Solar orientation (North, South, West, East)
                                type:
                                  - string
                                  - 'null'
                              is_from_network:
                                description: If Location is from network
                                type: boolean
                                readOnly: true
                              local_uuid:
                                description: Location UUID
                                type: string
                                format: uuid
                                readOnly: true
                              assets_count:
                                description: >-
                                  Cumulative count of assets (equipment) in this location and all its descendants. Only
                                  present when `with_assets_count=true` query parameter is provided.
                                type:
                                  - integer
                                  - 'null'
                                readOnly: true
                              associations:
                                description: >
                                  List of ways the operator is associated with this building. Possible values are
                                  `DIRECT` (via a direct local-operator assignment), `TEAM` (via a team the operator
                                  belongs to), and `CLIENT` (via a client the operator is assigned to).
                                type: array
                                items:
                                  type: string
                                  enum:
                                    - DIRECT
                                    - TEAM
                                    - CLIENT
                            required:
                              - name
                              - full_name
                              - code
                              - full_code
                              - observation
                              - date_updated
                          relationships:
                            type: object
                            properties:
                              building:
                                type: object
                                properties:
                                  data:
                                    type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - building
                                        readOnly: true
                                      id:
                                        type: string
                                        readOnly: true
                              files:
                                type: object
                                properties:
                                  data:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - file
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                              operators:
                                type: object
                                properties:
                                  data:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                              localOrientation:
                                type: object
                                properties:
                                  data:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - localOrientation
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                        required:
                          - id
                          - type
                          - attributes
              examples:
                Building:
                  value:
                    data:
                      type: building
                      id: '999'
                      attributes:
                        local_id: 123
                        name: Main Building
                        full_name: Main Building
                        code: MB
                        full_code: MB
                        observation: Additional info
                        entity_id: 999
                        date_updated: '2020-12-03 12:45:00'
                        has_children: true
                        client_id: 999
                        is_from_network: false
                Folder:
                  value:
                    data:
                      type: location-folder
                      id: '999'
                      attributes:
                        name: 1st Floor
                        full_name: Main Building - 1st Floor
                        code: 1F
                        full_code: MB.1F
                        entity_id: 999
                        date_updated: '2020-12-03 12:45:00'
                        has_children: true
                        parent_id: 999
                        root_parent_id: 999
                        is_from_network: false
                Location:
                  value:
                    data:
                      type: location
                      id: '999'
                      attributes:
                        name: Room 101
                        full_name: Main Building - 1st Floor - Room 101
                        code: R101
                        full_code: MB.1F.R101
                        observation: Premium room
                        entity_id: 999
                        date_updated: '2020-12-03 12:45:00'
                        parent_id: 999
                        root_parent_id: 999
                        area: 999.99
                        glass_area: 999.99
                        volume: 999.99
                        is_from_network: false
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
      x-toolbox: true
  /locations/{id}/children:
    get:
      operationId: getLocationChildren
      tags:
        - Locations
      summary: List all Location's children
      description: >
        This endpoint allows you to get lower level locations of a specific Location.


        The query parameters described below are to be used with the
        [JQL](../../../../../../../docs/api/.markdown/1.introduction/4-parameters.md).
      parameters:
        - name: id
          in: path
          description: The Location ID
          required: true
          schema:
            type: string
        - name: code
          in: query
          description: Filter results by given property value
          schema:
            type: string
        - name: full_code
          in: query
          description: Filter results by given property value
          schema:
            type: string
        - name: is_real
          in: query
          description: Filter results by given property value
          schema:
            type: boolean
        - name: local_id
          in: query
          description: Filter results by given property value
          schema:
            type: string
        - name: root_parent_id
          in: query
          description: Filter results by given property value
          schema:
            type: string
        - name: with_assets_count
          in: query
          description: Include cumulative assets count for each location (includes all descendant locations)
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      anyOf:
                        - title: Location
                          description: Location model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Location
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - location
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                entity_id:
                                  type: integer
                                name:
                                  description: Location name
                                  type: string
                                full_name:
                                  description: Names of the location's parents concatenated by hyphen with location name.
                                  type: string
                                  readOnly: true
                                code:
                                  description: Location code.
                                  type: string
                                full_code:
                                  description: Codes of the location's parents concatenated by dot with location code.
                                  type: string
                                  readOnly: true
                                original_full_code:
                                  description: Location original full code.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                observation:
                                  description: Additional information
                                  type:
                                    - string
                                    - 'null'
                                date_updated:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - '2020-12-03 12:45:00'
                                parent_id:
                                  description: ID of the location parent.
                                  type: integer
                                root_parent_id:
                                  description: ID of the location root parent (of `type` equals to `building`).
                                  type: integer
                                  readOnly: true
                                area:
                                  description: Location area
                                  type:
                                    - number
                                    - 'null'
                                glass_area:
                                  description: Location glass area
                                  type:
                                    - number
                                    - 'null'
                                volume:
                                  description: Location volume
                                  type:
                                    - number
                                    - 'null'
                                orientation:
                                  description: Solar orientation (North, South, West, East)
                                  type:
                                    - string
                                    - 'null'
                                is_from_network:
                                  description: If Location is from network
                                  type: boolean
                                  readOnly: true
                                local_uuid:
                                  description: Location UUID
                                  type: string
                                  format: uuid
                                  readOnly: true
                                assets_count:
                                  description: >-
                                    Cumulative count of assets (equipment) in this location and all its descendants.
                                    Only present when `with_assets_count=true` query parameter is provided.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                associations:
                                  description: >
                                    List of ways the operator is associated with this building. Possible values are
                                    `DIRECT` (via a direct local-operator assignment), `TEAM` (via a team the operator
                                    belongs to), and `CLIENT` (via a client the operator is assigned to).
                                  type: array
                                  items:
                                    type: string
                                    enum:
                                      - DIRECT
                                      - TEAM
                                      - CLIENT
                              required:
                                - name
                                - full_name
                                - code
                                - full_code
                                - observation
                                - date_updated
                            relationships:
                              type: object
                              properties:
                                building:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - building
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                files:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - file
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                operators:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - operator
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                localOrientation:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - localOrientation
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                          required:
                            - id
                            - type
                            - attributes
                        - title: Folder
                          description: Location model of type `location-folder` structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Location
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - location-folder
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                entity_id:
                                  type: integer
                                name:
                                  description: Folder name
                                  type: string
                                full_name:
                                  description: Names of the location's parents concatenated by hyphen with location name.
                                  type: string
                                  readOnly: true
                                code:
                                  description: Folder code.
                                  type: string
                                full_code:
                                  description: Codes of the Folder's parents concatenated by dot with Folder code.
                                  type: string
                                  readOnly: true
                                original_full_code:
                                  description: Location original full code.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                observation:
                                  description: Additional information
                                  type:
                                    - string
                                    - 'null'
                                date_updated:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-12-03T12:45:00.000Z'
                                parent_id:
                                  description: ID of the Folder parent.
                                  type: integer
                                root_parent_id:
                                  description: ID of the Folder root parent (of `type` equals to `building`).
                                  type: integer
                                  readOnly: true
                                is_from_network:
                                  description: If Folder is from network
                                  type: boolean
                                  readOnly: true
                                assets_count:
                                  description: >-
                                    Cumulative count of assets in this folder (including all nested locations). Only
                                    returned when `with_assets_count=true` query parameter is provided.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                  examples:
                                    - 5
                              required:
                                - name
                                - full_name
                                - code
                                - full_code
                                - observation
                                - date_updated
                            relationships:
                              type: object
                              properties:
                                building:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - building
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                          required:
                            - id
                            - type
                            - attributes
                  included:
                    description: List of relationships to be included
                    type: array
                    items:
                      anyOf:
                        - title: Location
                          description: Location model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Location
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - location
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                entity_id:
                                  type: integer
                                name:
                                  description: Location name
                                  type: string
                                full_name:
                                  description: Names of the location's parents concatenated by hyphen with location name.
                                  type: string
                                  readOnly: true
                                code:
                                  description: Location code.
                                  type: string
                                full_code:
                                  description: Codes of the location's parents concatenated by dot with location code.
                                  type: string
                                  readOnly: true
                                original_full_code:
                                  description: Location original full code.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                observation:
                                  description: Additional information
                                  type:
                                    - string
                                    - 'null'
                                date_updated:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - '2020-12-03 12:45:00'
                                parent_id:
                                  description: ID of the location parent.
                                  type: integer
                                root_parent_id:
                                  description: ID of the location root parent (of `type` equals to `building`).
                                  type: integer
                                  readOnly: true
                                area:
                                  description: Location area
                                  type:
                                    - number
                                    - 'null'
                                glass_area:
                                  description: Location glass area
                                  type:
                                    - number
                                    - 'null'
                                volume:
                                  description: Location volume
                                  type:
                                    - number
                                    - 'null'
                                orientation:
                                  description: Solar orientation (North, South, West, East)
                                  type:
                                    - string
                                    - 'null'
                                is_from_network:
                                  description: If Location is from network
                                  type: boolean
                                  readOnly: true
                                local_uuid:
                                  description: Location UUID
                                  type: string
                                  format: uuid
                                  readOnly: true
                                assets_count:
                                  description: >-
                                    Cumulative count of assets (equipment) in this location and all its descendants.
                                    Only present when `with_assets_count=true` query parameter is provided.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                associations:
                                  description: >
                                    List of ways the operator is associated with this building. Possible values are
                                    `DIRECT` (via a direct local-operator assignment), `TEAM` (via a team the operator
                                    belongs to), and `CLIENT` (via a client the operator is assigned to).
                                  type: array
                                  items:
                                    type: string
                                    enum:
                                      - DIRECT
                                      - TEAM
                                      - CLIENT
                              required:
                                - name
                                - full_name
                                - code
                                - full_code
                                - observation
                                - date_updated
                            relationships:
                              type: object
                              properties:
                                building:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - building
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                files:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - file
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                operators:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - operator
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                localOrientation:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - localOrientation
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                          required:
                            - id
                            - type
                            - attributes
                    uniqueItems: true
                  meta:
                    title: Meta
                    description: Meta model structure details
                    type: object
                    properties:
                      pagination:
                        type: object
                        properties:
                          total:
                            description: Total items.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          count:
                            description: Total items returned for the current page.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          per_page:
                            description: Maximum number of records per page.
                            type: integer
                            minimum: 1
                            default: 200
                            examples:
                              - 1
                          current_page:
                            description: Number of the current page.
                            type: integer
                            minimum: 1
                            default: 1
                          total_pages:
                            description: Number of the total pages.
                            type: integer
                            minimum: 1
                            default: 1
                        required:
                          - total
                          - count
                          - per_page
                          - current_page
                          - total_pages
                  links:
                    title: Response Links on listing operations
                    description: >-
                      Requests that return multiple items include a `links` attribute, with links related to request's
                      context.
                    type: object
                    properties:
                      self:
                        description: Current response link.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      first:
                        description: Link to the first page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      last:
                        description: Link to the previous page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      next:
                        description: Link to the next page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                    required:
                      - self
                      - first
                      - last
              examples:
                Example:
                  value:
                    data:
                      - type: location-folder
                        id: '999'
                        attributes:
                          name: 1st Floor
                          full_name: Main Building - 1st Floor
                          code: 1F
                          full_code: MB.1F
                          entity_id: 999
                          date_updated: '2020-12-03 12:45:00'
                          has_children: true
                          parent_id: 999
                          root_parent_id: 999
                          is_from_network: false
                      - type: location
                        id: '999'
                        attributes:
                          name: Room 101
                          full_name: Main Building - 1st Floor - Room 101
                          code: R101
                          full_code: MB.1F.R101
                          observation: Premium room
                          entity_id: 999
                          date_updated: '2020-12-03 12:45:00'
                          parent_id: 999
                          root_parent_id: 999
                          area: 999.99
                          glass_area: 999.99
                          volume: 999.99
                          is_from_network: false
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /materials:
    get:
      operationId: getMaterials
      tags:
        - Materials
      summary: List all family/group of materials
      description: >
        This endpoint allows you to list all the materials created as `FOLDER` (material that is the parent of other
        materials, as a family or group of materials)
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      title: Material
                      description: Material model structure details
                      type: object
                      properties:
                        id:
                          description: ID of the Material
                          type: string
                          examples:
                            - '1'
                          readOnly: true
                        type:
                          description: Model type
                          type: string
                          enum:
                            - material
                          examples:
                            - material
                          readOnly: true
                        attributes:
                          type: object
                          properties:
                            material_id:
                              description: ID of the material
                              type: integer
                              examples:
                                - 1
                              readOnly: true
                            parent_id:
                              description: ID of the associated folder of the material
                              type: integer
                              examples:
                                - 1
                              readOnly: true
                            name:
                              description: Name of the material
                              type: string
                              examples:
                                - Chair
                            code:
                              description: Code of the material
                              type: string
                              examples:
                                - CH-00001
                            full_code:
                              description: Full code of the material (folders prefix included)
                              type: string
                              examples:
                                - FOLDER.CH-00001
                              readOnly: true
                            observations:
                              description: Material observations
                              type:
                                - string
                                - 'null'
                              examples:
                                - This is a observation
                            is_real:
                              description: Indicates if this is a real material or a parent folder of materials
                              type: boolean
                              examples:
                                - true
                            units:
                              description: Indicates which kind of unit should this material be measured with
                              type: string
                              examples:
                                - un
                            mean_price:
                              description: Mean price of the material
                              examples:
                                - 8
                            has_children:
                              description: Indicates if this material is a parent of other materials
                              type: boolean
                              examples:
                                - true
                            default_sell_price:
                              description: The default sell price of the material
                              type: number
                              examples:
                                - 10
                            default_sell_vat:
                              description: The default sell VAT of the material
                              type: number
                              examples:
                                - 23
                            is_from_network:
                              description: Indicates if the material was shared via Infraspeak Network
                              type: boolean
                              examples:
                                - false
                            purchase_consumption_type:
                              description: Purchase consumption type of the material
                              type: string
                              enum:
                                - INHERIT
                                - AUTOMATIC
                                - MANUAL
                              examples:
                                - INHERIT
                      required:
                        - id
                        - type
                        - attributes
                  meta:
                    title: Meta
                    description: Meta model structure details
                    type: object
                    properties:
                      pagination:
                        type: object
                        properties:
                          total:
                            description: Total items.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          count:
                            description: Total items returned for the current page.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          per_page:
                            description: Maximum number of records per page.
                            type: integer
                            minimum: 1
                            default: 200
                            examples:
                              - 1
                          current_page:
                            description: Number of the current page.
                            type: integer
                            minimum: 1
                            default: 1
                          total_pages:
                            description: Number of the total pages.
                            type: integer
                            minimum: 1
                            default: 1
                        required:
                          - total
                          - count
                          - per_page
                          - current_page
                          - total_pages
                  links:
                    title: Response Links on listing operations
                    description: >-
                      Requests that return multiple items include a `links` attribute, with links related to request's
                      context.
                    type: object
                    properties:
                      self:
                        description: Current response link.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      first:
                        description: Link to the first page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      last:
                        description: Link to the previous page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      next:
                        description: Link to the next page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                    required:
                      - self
                      - first
                      - last
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
      deprecated: true
    post:
      operationId: createLegacyMaterial
      tags:
        - Materials
      summary: Create a new material or folder
      description: |
        This endpoint allows you to create a new material.

        Materials are items that can be of type `MATERIAL` or of type `FOLDER`.
        A folder is a material that is the "parent" of other materials, for example, as a family or group of materials.

        The `parent_id` is required if the type is `MATERIAL`
      requestBody:
        content:
          application/json:
            schema:
              description: Material payload
              type: object
              properties:
                _type:
                  description: Type of the material
                  type: string
                  enum:
                    - FOLDER
                    - MATERIAL
                name:
                  description: Name of the material
                  type: string
                  examples:
                    - Chair
                code:
                  description: Code of the material. It must be unique
                  type: string
                  examples:
                    - CH-0001
                observation:
                  description: Description of the material
                  type: string
                  examples:
                    - This is a chair
                mean_price:
                  description: The mean price of the item. Used only when `_type` is "MATERIAL"
                  type: number
                  examples:
                    - 10.5
                units:
                  description: What unit should this item be measured with. Required if `_type` is "MATERIAL"
                  type: string
                  examples:
                    - un
                material_warehouse:
                  description: >-
                    Minimum Stock and other information of the material. This field is of type array and can contain
                    multiple material_warehouse objects containing "warehouse_id" (required), "min_stock" (greater than
                    0) and "mean_price"
                  type: array
                  items:
                    type: object
                    properties:
                      warehouse_id:
                        description: ID of the associated warehouse
                        type: integer
                      min_stock:
                        description: Minimum quantity of the material defined for this warehouse.
                        type: number
                      mean_price:
                        description: Mean price of the material defined for this warehouse.
                        type: number
                      observation:
                        description: An observation for the material in this specific warehouse.
                        type: string
                parent_id:
                  description: The id of the parent folder for this item. Required if `_type` is "MATERIAL"
                  type: integer
                default_sell_price:
                  description: The default sell price for this item.
                  type: number
                default_sell_vat:
                  description: The default sell VAT for this item.
                  type: number
              required:
                - _type
                - name
                - code
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: Material
                    description: Material model structure details
                    type: object
                    properties:
                      id:
                        description: ID of the Material
                        type: string
                        examples:
                          - '1'
                        readOnly: true
                      type:
                        description: Model type
                        type: string
                        enum:
                          - material
                        examples:
                          - material
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          material_id:
                            description: ID of the material
                            type: integer
                            examples:
                              - 1
                            readOnly: true
                          parent_id:
                            description: ID of the associated folder of the material
                            type: integer
                            examples:
                              - 1
                            readOnly: true
                          name:
                            description: Name of the material
                            type: string
                            examples:
                              - Chair
                          code:
                            description: Code of the material
                            type: string
                            examples:
                              - CH-00001
                          full_code:
                            description: Full code of the material (folders prefix included)
                            type: string
                            examples:
                              - FOLDER.CH-00001
                            readOnly: true
                          observations:
                            description: Material observations
                            type:
                              - string
                              - 'null'
                            examples:
                              - This is a observation
                          is_real:
                            description: Indicates if this is a real material or a parent folder of materials
                            type: boolean
                            examples:
                              - true
                          units:
                            description: Indicates which kind of unit should this material be measured with
                            type: string
                            examples:
                              - un
                          mean_price:
                            description: Mean price of the material
                            examples:
                              - 8
                          has_children:
                            description: Indicates if this material is a parent of other materials
                            type: boolean
                            examples:
                              - true
                          default_sell_price:
                            description: The default sell price of the material
                            type: number
                            examples:
                              - 10
                          default_sell_vat:
                            description: The default sell VAT of the material
                            type: number
                            examples:
                              - 23
                          is_from_network:
                            description: Indicates if the material was shared via Infraspeak Network
                            type: boolean
                            examples:
                              - false
                          purchase_consumption_type:
                            description: Purchase consumption type of the material
                            type: string
                            enum:
                              - INHERIT
                              - AUTOMATIC
                              - MANUAL
                            examples:
                              - INHERIT
                    required:
                      - id
                      - type
                      - attributes
              examples:
                Example:
                  externalValue: ./examples/material.json
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
      deprecated: true
  /materials/all:
    get:
      operationId: getAllMaterials
      tags:
        - Materials
      summary: List all the materials
      description: This endpoint allows you to list all the materials.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      title: Material
                      description: Material model structure details
                      type: object
                      properties:
                        id:
                          description: ID of the Material
                          type: string
                          examples:
                            - '1'
                          readOnly: true
                        type:
                          description: Model type
                          type: string
                          enum:
                            - material
                          examples:
                            - material
                          readOnly: true
                        attributes:
                          type: object
                          properties:
                            material_id:
                              description: ID of the material
                              type: integer
                              examples:
                                - 1
                              readOnly: true
                            parent_id:
                              description: ID of the associated folder of the material
                              type: integer
                              examples:
                                - 1
                              readOnly: true
                            name:
                              description: Name of the material
                              type: string
                              examples:
                                - Chair
                            code:
                              description: Code of the material
                              type: string
                              examples:
                                - CH-00001
                            full_code:
                              description: Full code of the material (folders prefix included)
                              type: string
                              examples:
                                - FOLDER.CH-00001
                              readOnly: true
                            observations:
                              description: Material observations
                              type:
                                - string
                                - 'null'
                              examples:
                                - This is a observation
                            is_real:
                              description: Indicates if this is a real material or a parent folder of materials
                              type: boolean
                              examples:
                                - true
                            units:
                              description: Indicates which kind of unit should this material be measured with
                              type: string
                              examples:
                                - un
                            mean_price:
                              description: Mean price of the material
                              examples:
                                - 8
                            has_children:
                              description: Indicates if this material is a parent of other materials
                              type: boolean
                              examples:
                                - true
                            default_sell_price:
                              description: The default sell price of the material
                              type: number
                              examples:
                                - 10
                            default_sell_vat:
                              description: The default sell VAT of the material
                              type: number
                              examples:
                                - 23
                            is_from_network:
                              description: Indicates if the material was shared via Infraspeak Network
                              type: boolean
                              examples:
                                - false
                            purchase_consumption_type:
                              description: Purchase consumption type of the material
                              type: string
                              enum:
                                - INHERIT
                                - AUTOMATIC
                                - MANUAL
                              examples:
                                - INHERIT
                      required:
                        - id
                        - type
                        - attributes
                  meta:
                    title: Meta
                    description: Meta model structure details
                    type: object
                    properties:
                      pagination:
                        type: object
                        properties:
                          total:
                            description: Total items.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          count:
                            description: Total items returned for the current page.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          per_page:
                            description: Maximum number of records per page.
                            type: integer
                            minimum: 1
                            default: 200
                            examples:
                              - 1
                          current_page:
                            description: Number of the current page.
                            type: integer
                            minimum: 1
                            default: 1
                          total_pages:
                            description: Number of the total pages.
                            type: integer
                            minimum: 1
                            default: 1
                        required:
                          - total
                          - count
                          - per_page
                          - current_page
                          - total_pages
                  links:
                    title: Response Links on listing operations
                    description: >-
                      Requests that return multiple items include a `links` attribute, with links related to request's
                      context.
                    type: object
                    properties:
                      self:
                        description: Current response link.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      first:
                        description: Link to the first page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      last:
                        description: Link to the previous page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      next:
                        description: Link to the next page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                    required:
                      - self
                      - first
                      - last
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
      deprecated: true
  /materials/{materialId}:
    get:
      operationId: getMaterial
      tags:
        - Materials
      summary: Get a Material
      description: This endpoint allows you to get a Material.
      parameters:
        - name: materialId
          in: path
          description: The Material ID
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: Material
                    description: Material model structure details
                    type: object
                    properties:
                      id:
                        description: ID of the Material
                        type: string
                        examples:
                          - '1'
                        readOnly: true
                      type:
                        description: Model type
                        type: string
                        enum:
                          - material
                        examples:
                          - material
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          material_id:
                            description: ID of the material
                            type: integer
                            examples:
                              - 1
                            readOnly: true
                          parent_id:
                            description: ID of the associated folder of the material
                            type: integer
                            examples:
                              - 1
                            readOnly: true
                          name:
                            description: Name of the material
                            type: string
                            examples:
                              - Chair
                          code:
                            description: Code of the material
                            type: string
                            examples:
                              - CH-00001
                          full_code:
                            description: Full code of the material (folders prefix included)
                            type: string
                            examples:
                              - FOLDER.CH-00001
                            readOnly: true
                          observations:
                            description: Material observations
                            type:
                              - string
                              - 'null'
                            examples:
                              - This is a observation
                          is_real:
                            description: Indicates if this is a real material or a parent folder of materials
                            type: boolean
                            examples:
                              - true
                          units:
                            description: Indicates which kind of unit should this material be measured with
                            type: string
                            examples:
                              - un
                          mean_price:
                            description: Mean price of the material
                            examples:
                              - 8
                          has_children:
                            description: Indicates if this material is a parent of other materials
                            type: boolean
                            examples:
                              - true
                          default_sell_price:
                            description: The default sell price of the material
                            type: number
                            examples:
                              - 10
                          default_sell_vat:
                            description: The default sell VAT of the material
                            type: number
                            examples:
                              - 23
                          is_from_network:
                            description: Indicates if the material was shared via Infraspeak Network
                            type: boolean
                            examples:
                              - false
                          purchase_consumption_type:
                            description: Purchase consumption type of the material
                            type: string
                            enum:
                              - INHERIT
                              - AUTOMATIC
                              - MANUAL
                            examples:
                              - INHERIT
                    required:
                      - id
                      - type
                      - attributes
              examples:
                Example:
                  externalValue: ./examples/material.json
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
      deprecated: true
    delete:
      operationId: deleteMaterial
      tags:
        - Materials
      summary: Delete a material
      description: |
        This endpoint allows you to delete a specific Material.

        Note that Materials that contain lower level materials (materials created as 'Folder') cannot be deleted.
      parameters:
        - name: materialId
          in: path
          description: The Material ID
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items: {}
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
      deprecated: true
    patch:
      operationId: updateMaterial
      tags:
        - Materials
      summary: Update a material
      description: This endpoint allows you to update a specific material.
      parameters:
        - name: materialId
          in: path
          description: The Material ID
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              description: Material payload
              type: object
              properties:
                _type:
                  description: Type of the material
                  type: string
                  enum:
                    - FOLDER
                    - MATERIAL
                name:
                  description: Name of the material
                  type: string
                  examples:
                    - Chair
                code:
                  description: Code of the material. It must be unique
                  type: string
                  examples:
                    - CH-0001
                observation:
                  description: Description of the material
                  type: string
                  examples:
                    - This is a chair
                mean_price:
                  description: The mean price of the item. Used only when `_type` is "MATERIAL"
                  type: number
                  examples:
                    - 10.5
                units:
                  description: What unit should this item be measured with. Required if `_type` is "MATERIAL"
                  type: string
                  examples:
                    - un
                material_warehouse:
                  description: >-
                    Minimum Stock and other information of the material. This field is of type array and can contain
                    multiple material_warehouse objects containing "warehouse_id" (required), "min_stock" (greater than
                    0) and "mean_price"
                  type: array
                  items:
                    type: object
                    properties:
                      warehouse_id:
                        description: ID of the associated warehouse
                        type: integer
                      min_stock:
                        description: Minimum quantity of the material defined for this warehouse.
                        type: number
                      mean_price:
                        description: Mean price of the material defined for this warehouse.
                        type: number
                      observation:
                        description: An observation for the material in this specific warehouse.
                        type: string
                parent_id:
                  description: The id of the parent folder for this item. Required if `_type` is "MATERIAL"
                  type: integer
                default_sell_price:
                  description: The default sell price for this item.
                  type: number
                default_sell_vat:
                  description: The default sell VAT for this item.
                  type: number
              required:
                - _type
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: Material
                    description: Material model structure details
                    type: object
                    properties:
                      id:
                        description: ID of the Material
                        type: string
                        examples:
                          - '1'
                        readOnly: true
                      type:
                        description: Model type
                        type: string
                        enum:
                          - material
                        examples:
                          - material
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          material_id:
                            description: ID of the material
                            type: integer
                            examples:
                              - 1
                            readOnly: true
                          parent_id:
                            description: ID of the associated folder of the material
                            type: integer
                            examples:
                              - 1
                            readOnly: true
                          name:
                            description: Name of the material
                            type: string
                            examples:
                              - Chair
                          code:
                            description: Code of the material
                            type: string
                            examples:
                              - CH-00001
                          full_code:
                            description: Full code of the material (folders prefix included)
                            type: string
                            examples:
                              - FOLDER.CH-00001
                            readOnly: true
                          observations:
                            description: Material observations
                            type:
                              - string
                              - 'null'
                            examples:
                              - This is a observation
                          is_real:
                            description: Indicates if this is a real material or a parent folder of materials
                            type: boolean
                            examples:
                              - true
                          units:
                            description: Indicates which kind of unit should this material be measured with
                            type: string
                            examples:
                              - un
                          mean_price:
                            description: Mean price of the material
                            examples:
                              - 8
                          has_children:
                            description: Indicates if this material is a parent of other materials
                            type: boolean
                            examples:
                              - true
                          default_sell_price:
                            description: The default sell price of the material
                            type: number
                            examples:
                              - 10
                          default_sell_vat:
                            description: The default sell VAT of the material
                            type: number
                            examples:
                              - 23
                          is_from_network:
                            description: Indicates if the material was shared via Infraspeak Network
                            type: boolean
                            examples:
                              - false
                          purchase_consumption_type:
                            description: Purchase consumption type of the material
                            type: string
                            enum:
                              - INHERIT
                              - AUTOMATIC
                              - MANUAL
                            examples:
                              - INHERIT
                    required:
                      - id
                      - type
                      - attributes
              examples:
                Example:
                  externalValue: ./examples/material.json
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
      deprecated: true
  /operators:
    get:
      operationId: getOperators
      tags:
        - Operators
      summary: List all Operators
      description: This endpoint allows you to list all Operators.
      parameters: []
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      title: Operator
                      description: Operator model structure details
                      type: object
                      properties:
                        id:
                          description: ID of the Operator
                          type: string
                          readOnly: true
                        type:
                          description: Model type
                          type: string
                          enum:
                            - operator
                          readOnly: true
                        attributes:
                          type: object
                          properties:
                            operator_id:
                              description: ID of the Operator
                              type: integer
                              readOnly: true
                            operator_uuid:
                              description: Uuid of the Operator
                              type: string
                              format: uuid
                              readOnly: true
                            full_name:
                              type: string
                            email:
                              type: string
                              format: email
                            phone:
                              type:
                                - string
                                - 'null'
                            cellphone:
                              type:
                                - string
                                - 'null'
                            account:
                              description: Type of account which determines the access permission level.
                              type: string
                              enum:
                                - admin
                                - manager
                                - technician
                                - operator
                                - reporter
                            language:
                              type: string
                              enum:
                                - ar
                                - ca
                                - da_dk
                                - en
                                - es
                                - fr_fr
                                - pl_pl
                                - pt_br
                                - pt_pt
                                - ko
                                - zh_cn
                                - nl_nl
                                - de_de
                            cost_per_hour:
                              type: number
                              minimum: 0
                              examples:
                                - 10
                            warehouse_id:
                              description: ID of the warehouse associated to the Operator by default.
                              type: integer
                            entity_id:
                              type: integer
                              readOnly: true
                            timezone:
                              description: >
                                Valid PHP timezone identifier. See the full list here:
                                https://www.php.net/manual/en/timezones.php.
                              type: string
                              examples:
                                - Europe/Lisbon
                            is_from_network:
                              type: boolean
                            created_at:
                              type: string
                              format: date-time
                            phone_country_code:
                              type: string
                              examples:
                                - US
                            is_first_web_login:
                              type:
                                - boolean
                                - 'null'
                              readOnly: true
                            status:
                              type: string
                              enum:
                                - WORKING
                                - AVAILABLE
                                - OFFLINE
                              examples:
                                - WORKING
                        meta:
                          type: object
                          properties:
                            custom_fields:
                              type:
                                - object
                                - 'null'
                              additionalProperties:
                                oneOf:
                                  - type: object
                                    properties:
                                      id:
                                        description: The unique identifier for the Custom Field
                                        type: integer
                                        examples:
                                          - 123
                                      field_type:
                                        description: The type of the Custom Field
                                        type: string
                                        enum:
                                          - SELECT
                                        examples:
                                          - SELECT
                                      value:
                                        description: The current values of the Custom Field in this resource
                                        type:
                                          - array
                                          - 'null'
                                        items:
                                          type: object
                                          properties:
                                            option_id:
                                              description: The ID of the selected option
                                              type: integer
                                              examples:
                                                - 123
                                            option_code:
                                              description: The code of the selected option
                                              type:
                                                - string
                                                - 'null'
                                              examples:
                                                - OP01
                                            value:
                                              description: The value of the selected option
                                              type: string
                                              examples:
                                                - My Option 1
                                      configs:
                                        type: object
                                        properties:
                                          label:
                                            description: The label for the Custom Field
                                            type: string
                                            examples:
                                              - My field X
                                          code:
                                            description: The unique code for the Custom Field
                                            type: string
                                            examples:
                                              - C01
                                          required:
                                            description: Specifies if the Custom Field is required
                                            type: boolean
                                            examples:
                                              - true
                                          are_values_readonly:
                                            description: >-
                                              Specifies if the Custom Field values are read only (so only integrations
                                              can set them).
                                            type: boolean
                                            examples:
                                              - false
                                          archived_at:
                                            description: >-
                                              Indicates when the custom field was archived for this object type. Objects
                                              that belong to the archived type will still display the custom field value
                                              if it was configured before the archiving.
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-03-12 12:12:12'
                                          type_settings:
                                            description: The type settings for the Custom Field
                                            type: object
                                            properties:
                                              allow_multiple_selection:
                                                description: Indicates if the Custom Field supports selecting multiple values
                                                type: boolean
                                                examples:
                                                  - true
                                              managed_by_integrations:
                                                description: Indicates if the Custom Field options are only managed by integrations
                                                type: boolean
                                                examples:
                                                  - true
                                  - type: object
                                    properties:
                                      id:
                                        description: The unique identifier for the Custom Field
                                        type: integer
                                        examples:
                                          - 123
                                      field_type:
                                        description: The type of the Custom Field
                                        type: string
                                        enum:
                                          - TEXT
                                        examples:
                                          - TEXT
                                      value:
                                        description: The current value of the Custom Field in this resource
                                        type:
                                          - string
                                          - 'null'
                                        examples:
                                          - abc
                                      configs:
                                        type: object
                                        properties:
                                          label:
                                            description: The label for the Custom Field
                                            type: string
                                            examples:
                                              - My field X
                                          code:
                                            description: The unique code for the Custom Field
                                            type: string
                                            examples:
                                              - C01
                                          required:
                                            description: Specifies if the Custom Field is required
                                            type: boolean
                                            examples:
                                              - true
                                          are_values_readonly:
                                            description: >-
                                              Specifies if the Custom Field values are read only (so only integrations
                                              can set them).
                                            type: boolean
                                            examples:
                                              - false
                                          archived_at:
                                            description: >-
                                              Indicates when the custom field was archived for this object type. Objects
                                              that belong to the archived type will still display the custom field value
                                              if it was configured before the archiving.
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-03-12 12:12:12'
                                          type_settings:
                                            description: >-
                                              The type settings for the Custom Field (Empty for Custom Fields of type
                                              TEXT)
                                            type: object
                                  - type: object
                                    properties:
                                      id:
                                        description: The unique identifier for the Custom Field
                                        type: integer
                                        examples:
                                          - 123
                                      field_type:
                                        description: The type of the Custom Field
                                        type: string
                                        enum:
                                          - BOOLEAN
                                        examples:
                                          - BOOLEAN
                                      value:
                                        description: The current value of the Custom Field in this resource
                                        type:
                                          - boolean
                                          - 'null'
                                        examples:
                                          - true
                                      configs:
                                        type: object
                                        properties:
                                          label:
                                            description: The label for the Custom Field
                                            type: string
                                            examples:
                                              - My field X
                                          code:
                                            description: The unique code for the Custom Field
                                            type: string
                                            examples:
                                              - C01
                                          required:
                                            description: Specifies if the Custom Field is required
                                            type: boolean
                                            examples:
                                              - true
                                          are_values_readonly:
                                            description: >-
                                              Specifies if the Custom Field values are read only (so only integrations
                                              can set them).
                                            type: boolean
                                            examples:
                                              - false
                                          archived_at:
                                            description: >-
                                              Indicates when the custom field was archived for this object type. Objects
                                              that belong to the archived type will still display the custom field value
                                              if it was configured before the archiving.
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-03-12 12:12:12'
                                          type_settings:
                                            description: >-
                                              The type settings for the Custom Field (There are none for the Custom
                                              Field Boolean type)
                                            type: object
                                  - type: object
                                    properties:
                                      id:
                                        description: The unique identifier for the Custom Field
                                        type: integer
                                        examples:
                                          - 123
                                      field_type:
                                        description: The type of the Custom Field
                                        type: string
                                        enum:
                                          - RELATIONSHIP
                                        examples:
                                          - RELATIONSHIP
                                      value:
                                        description: The current values of the Custom Field in this resource
                                        type:
                                          - array
                                          - 'null'
                                        items:
                                          type: object
                                          properties:
                                            related_to_type:
                                              description: The type of object that is selected as the Custom Field Values
                                              type: string
                                              enum:
                                                - CLIENT
                                                - CONTACT
                                              examples:
                                                - CLIENT
                                            related_to_id:
                                              description: The ID of object that is selected as the Custom Field Value
                                              type: integer
                                              examples:
                                                - 123
                                      configs:
                                        type: object
                                        properties:
                                          label:
                                            description: The label for the Custom Field
                                            type: string
                                            examples:
                                              - My field X
                                          code:
                                            description: The unique code for the Custom Field
                                            type: string
                                            examples:
                                              - C01
                                          required:
                                            description: Specifies if the Custom Field is required
                                            type: boolean
                                            examples:
                                              - true
                                          are_values_readonly:
                                            description: >-
                                              Specifies if the Custom Field values are read only (so only integrations
                                              can set them).
                                            type: boolean
                                            examples:
                                              - false
                                          archived_at:
                                            description: >-
                                              Indicates when the custom field was archived for this object type. Objects
                                              that belong to the archived type will still display the custom field value
                                              if it was configured before the archiving.
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-03-12 12:12:12'
                                          type_settings:
                                            description: The type settings for the Custom Field
                                            type: object
                                            properties:
                                              allow_multiple_selection:
                                                description: Indicates if the Custom Field allows multiple selection
                                                type: boolean
                                                examples:
                                                  - false
                                              relationship_object:
                                                description: The type of object that is selected as the Custom Field Values
                                                type: string
                                                enum:
                                                  - CLIENT
                                                  - CONTACT
                                                examples:
                                                  - CLIENT
                                  - type: object
                                    properties:
                                      id:
                                        description: The unique identifier for the Custom Field
                                        type: integer
                                        examples:
                                          - 123
                                      field_type:
                                        description: The type of the Custom Field
                                        type: string
                                        enum:
                                          - DATETIME
                                        examples:
                                          - DATETIME
                                      value:
                                        description: The current value of the Custom Field in this resource
                                        type:
                                          - string
                                          - 'null'
                                        format: date-time
                                        examples:
                                          - '2025-12-12 12:39:00'
                                      configs:
                                        type: object
                                        properties:
                                          label:
                                            description: The label for the Custom Field
                                            type: string
                                            examples:
                                              - My field X
                                          code:
                                            description: The unique code for the Custom Field
                                            type: string
                                            examples:
                                              - C01
                                          required:
                                            description: Specifies if the Custom Field is required
                                            type: boolean
                                            examples:
                                              - true
                                          are_values_readonly:
                                            description: >-
                                              Specifies if the Custom Field values are read only (so only integrations
                                              can set them).
                                            type: boolean
                                            examples:
                                              - false
                                          archived_at:
                                            description: >-
                                              Indicates when the custom field was archived for this object type. Objects
                                              that belong to the archived type will still display the custom field value
                                              if it was configured before the archiving.
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-03-12 12:12:12'
                                          type_settings:
                                            description: The type settings for the Custom Field
                                            type: object
                                            properties:
                                              allow_past_dates:
                                                description: Indicates if this Custom Field support past dates
                                                type: boolean
                                                examples:
                                                  - false
                                              allow_future_dates:
                                                description: Indicates if this Custom Field support future dates
                                                type: boolean
                                                examples:
                                                  - true
                                  - type: object
                                    properties:
                                      id:
                                        description: The unique identifier for the Custom Field
                                        type: integer
                                        examples:
                                          - 123
                                      field_type:
                                        description: The type of the Custom Field
                                        type: string
                                        enum:
                                          - NUMBER
                                        examples:
                                          - NUMBER
                                      value:
                                        description: The current value of the Custom Field in this resource
                                        type:
                                          - integer
                                          - 'null'
                                        examples:
                                          - 12
                                      configs:
                                        type: object
                                        properties:
                                          label:
                                            description: The label for the Custom Field
                                            type: string
                                            examples:
                                              - My field X
                                          code:
                                            description: The unique code for the Custom Field
                                            type: string
                                            examples:
                                              - C01
                                          required:
                                            description: Specifies if the Custom Field is required
                                            type: boolean
                                            examples:
                                              - true
                                          are_values_readonly:
                                            description: >-
                                              Specifies if the Custom Field values are read only (so only integrations
                                              can set them).
                                            type: boolean
                                            examples:
                                              - false
                                          archived_at:
                                            description: >-
                                              Indicates when the custom field was archived for this object type. Objects
                                              that belong to the archived type will still display the custom field value
                                              if it was configured before the archiving.
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-03-12 12:12:12'
                                          type_settings:
                                            description: The type settings for the Custom Field
                                            type: object
                                            properties:
                                              min:
                                                description: Indicates the minimum value for the Custom Field
                                                type:
                                                  - integer
                                                  - 'null'
                                                examples:
                                                  - 1
                                              max:
                                                description: Indicates the maximum value for the Custom Field
                                                type:
                                                  - integer
                                                  - 'null'
                                                examples:
                                                  - 3
                                discriminator:
                                  propertyName: field_type
                  meta:
                    title: Meta
                    description: Meta model structure details
                    type: object
                    properties:
                      pagination:
                        type: object
                        properties:
                          total:
                            description: Total items.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          count:
                            description: Total items returned for the current page.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          per_page:
                            description: Maximum number of records per page.
                            type: integer
                            minimum: 1
                            default: 200
                            examples:
                              - 1
                          current_page:
                            description: Number of the current page.
                            type: integer
                            minimum: 1
                            default: 1
                          total_pages:
                            description: Number of the total pages.
                            type: integer
                            minimum: 1
                            default: 1
                        required:
                          - total
                          - count
                          - per_page
                          - current_page
                          - total_pages
                  links:
                    title: Response Links on listing operations
                    description: >-
                      Requests that return multiple items include a `links` attribute, with links related to request's
                      context.
                    type: object
                    properties:
                      self:
                        description: Current response link.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      first:
                        description: Link to the first page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      last:
                        description: Link to the previous page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      next:
                        description: Link to the next page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                    required:
                      - self
                      - first
                      - last
              examples:
                Example:
                  value:
                    type: operator
                    id: '43'
                    attributes:
                      operator_id: 43
                      operator_uuid: 0189da7e-6bcb-70fc-b60f-d66991131b14
                      full_name: John Doe
                      email: johndoe@example.com
                      phone: +351 999999999
                      cellphone: +351 888888888
                      account: admin
                      language: en
                      cost_per_hour: 25
                      warehouse_id: 1517
                      entity_id: 12
                      timezone: Europe/Lisbon
                      is_from_network: false
                      created_at: '2025-05-22T16:02:45.000000Z'
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '403':
          description: Forbidden. The action can not be fulfilled.
          content:
            application/json:
              schema:
                title: 403 Forbidden
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 403
                      message:
                        type: string
                        examples:
                          - Action unauthorized
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 403
                      message: Action unauthorized
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
    post:
      operationId: createOperator
      tags:
        - Operators
      summary: Create an Operator
      description: >
        This endpoint allows you to create an Operator, which is the system's users.


        There are five account types which determines access permission level: "admin", "manager", "technician",
        "operator" and "reporter".
      requestBody:
        content:
          application/json:
            schema:
              description: Operator payload
              type: object
              properties:
                full_name:
                  type: string
                email:
                  type: string
                  format: email
                password:
                  description: Must have at least one uppercase letter and one digit or special character.
                  type: string
                  format: password
                  minLength: 8
                  writeOnly: true
                account:
                  description: Type of account which determines the access permission level.
                  type: string
                  enum:
                    - admin
                    - manager
                    - technician
                    - operator
                    - reporter
                language:
                  description: If no language is provided, the default Entity language will be used.
                  type: string
                  enum:
                    - ar
                    - ca
                    - da_dk
                    - en
                    - es
                    - fr_fr
                    - pl_pl
                    - pt_br
                    - pt_pt
                    - ko
                    - zh_cn
                    - nl_nl
                timezone:
                  description: >
                    Valid PHP timezone identifier. See the full list here: https://www.php.net/manual/en/timezones.php.
                    If no timezone is provided, the default Entity timezone will be used.
                  type: string
                  examples:
                    - Europe/Lisbon
                cost_per_hour:
                  type: number
                  minimum: 0
                  examples:
                    - 10
                warehouse_id:
                  description: ID of the warehouse associated to the Operator by default.
                  type:
                    - integer
                    - 'null'
                phone:
                  type:
                    - string
                    - 'null'
                cellphone:
                  type:
                    - string
                    - 'null'
                technical_skills:
                  description: An array with the IDs of the TechnicalSkills we want to associate the Operator.
                  type:
                    - array
                    - 'null'
                  items:
                    type: integer
              required:
                - account
                - email
                - full_name
                - password
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: Operator
                    description: Operator model structure details
                    type: object
                    properties:
                      id:
                        description: ID of the Operator
                        type: string
                        readOnly: true
                      type:
                        description: Model type
                        type: string
                        enum:
                          - operator
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          operator_id:
                            description: ID of the Operator
                            type: integer
                            readOnly: true
                          operator_uuid:
                            description: Uuid of the Operator
                            type: string
                            format: uuid
                            readOnly: true
                          full_name:
                            type: string
                          email:
                            type: string
                            format: email
                          phone:
                            type:
                              - string
                              - 'null'
                          cellphone:
                            type:
                              - string
                              - 'null'
                          account:
                            description: Type of account which determines the access permission level.
                            type: string
                            enum:
                              - admin
                              - manager
                              - technician
                              - operator
                              - reporter
                          language:
                            type: string
                            enum:
                              - ar
                              - ca
                              - da_dk
                              - en
                              - es
                              - fr_fr
                              - pl_pl
                              - pt_br
                              - pt_pt
                              - ko
                              - zh_cn
                              - nl_nl
                              - de_de
                          cost_per_hour:
                            type: number
                            minimum: 0
                            examples:
                              - 10
                          warehouse_id:
                            description: ID of the warehouse associated to the Operator by default.
                            type: integer
                          entity_id:
                            type: integer
                            readOnly: true
                          timezone:
                            description: >
                              Valid PHP timezone identifier. See the full list here:
                              https://www.php.net/manual/en/timezones.php.
                            type: string
                            examples:
                              - Europe/Lisbon
                          is_from_network:
                            type: boolean
                          created_at:
                            type: string
                            format: date-time
                          phone_country_code:
                            type: string
                            examples:
                              - US
                          is_first_web_login:
                            type:
                              - boolean
                              - 'null'
                            readOnly: true
                          status:
                            type: string
                            enum:
                              - WORKING
                              - AVAILABLE
                              - OFFLINE
                            examples:
                              - WORKING
                      meta:
                        type: object
                        properties:
                          custom_fields:
                            type:
                              - object
                              - 'null'
                            additionalProperties:
                              oneOf:
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - SELECT
                                      examples:
                                        - SELECT
                                    value:
                                      description: The current values of the Custom Field in this resource
                                      type:
                                        - array
                                        - 'null'
                                      items:
                                        type: object
                                        properties:
                                          option_id:
                                            description: The ID of the selected option
                                            type: integer
                                            examples:
                                              - 123
                                          option_code:
                                            description: The code of the selected option
                                            type:
                                              - string
                                              - 'null'
                                            examples:
                                              - OP01
                                          value:
                                            description: The value of the selected option
                                            type: string
                                            examples:
                                              - My Option 1
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: The type settings for the Custom Field
                                          type: object
                                          properties:
                                            allow_multiple_selection:
                                              description: Indicates if the Custom Field supports selecting multiple values
                                              type: boolean
                                              examples:
                                                - true
                                            managed_by_integrations:
                                              description: Indicates if the Custom Field options are only managed by integrations
                                              type: boolean
                                              examples:
                                                - true
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - TEXT
                                      examples:
                                        - TEXT
                                    value:
                                      description: The current value of the Custom Field in this resource
                                      type:
                                        - string
                                        - 'null'
                                      examples:
                                        - abc
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: >-
                                            The type settings for the Custom Field (Empty for Custom Fields of type
                                            TEXT)
                                          type: object
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - BOOLEAN
                                      examples:
                                        - BOOLEAN
                                    value:
                                      description: The current value of the Custom Field in this resource
                                      type:
                                        - boolean
                                        - 'null'
                                      examples:
                                        - true
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: >-
                                            The type settings for the Custom Field (There are none for the Custom Field
                                            Boolean type)
                                          type: object
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - RELATIONSHIP
                                      examples:
                                        - RELATIONSHIP
                                    value:
                                      description: The current values of the Custom Field in this resource
                                      type:
                                        - array
                                        - 'null'
                                      items:
                                        type: object
                                        properties:
                                          related_to_type:
                                            description: The type of object that is selected as the Custom Field Values
                                            type: string
                                            enum:
                                              - CLIENT
                                              - CONTACT
                                            examples:
                                              - CLIENT
                                          related_to_id:
                                            description: The ID of object that is selected as the Custom Field Value
                                            type: integer
                                            examples:
                                              - 123
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: The type settings for the Custom Field
                                          type: object
                                          properties:
                                            allow_multiple_selection:
                                              description: Indicates if the Custom Field allows multiple selection
                                              type: boolean
                                              examples:
                                                - false
                                            relationship_object:
                                              description: The type of object that is selected as the Custom Field Values
                                              type: string
                                              enum:
                                                - CLIENT
                                                - CONTACT
                                              examples:
                                                - CLIENT
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - DATETIME
                                      examples:
                                        - DATETIME
                                    value:
                                      description: The current value of the Custom Field in this resource
                                      type:
                                        - string
                                        - 'null'
                                      format: date-time
                                      examples:
                                        - '2025-12-12 12:39:00'
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: The type settings for the Custom Field
                                          type: object
                                          properties:
                                            allow_past_dates:
                                              description: Indicates if this Custom Field support past dates
                                              type: boolean
                                              examples:
                                                - false
                                            allow_future_dates:
                                              description: Indicates if this Custom Field support future dates
                                              type: boolean
                                              examples:
                                                - true
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - NUMBER
                                      examples:
                                        - NUMBER
                                    value:
                                      description: The current value of the Custom Field in this resource
                                      type:
                                        - integer
                                        - 'null'
                                      examples:
                                        - 12
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: The type settings for the Custom Field
                                          type: object
                                          properties:
                                            min:
                                              description: Indicates the minimum value for the Custom Field
                                              type:
                                                - integer
                                                - 'null'
                                              examples:
                                                - 1
                                            max:
                                              description: Indicates the maximum value for the Custom Field
                                              type:
                                                - integer
                                                - 'null'
                                              examples:
                                                - 3
                              discriminator:
                                propertyName: field_type
              examples:
                Example:
                  value:
                    type: operator
                    id: '43'
                    attributes:
                      operator_id: 43
                      operator_uuid: 0189da7e-6bcb-70fc-b60f-d66991131b14
                      full_name: John Doe
                      email: johndoe@example.com
                      phone: +351 999999999
                      cellphone: +351 888888888
                      account: admin
                      language: en
                      cost_per_hour: 25
                      warehouse_id: 1517
                      entity_id: 12
                      timezone: Europe/Lisbon
                      is_from_network: false
                      created_at: '2025-05-22T16:02:45.000000Z'
                      is_first_web_login: true
                      status: OFFLINE
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /operators/{operator}:
    get:
      operationId: getOperator
      tags:
        - Operators
      summary: Get an Operator
      description: This endpoint allows you to get a specific Operator.
      parameters:
        - name: operator
          in: path
          description: The Operator ID
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: Operator
                    description: Operator model structure details
                    type: object
                    properties:
                      id:
                        description: ID of the Operator
                        type: string
                        readOnly: true
                      type:
                        description: Model type
                        type: string
                        enum:
                          - operator
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          operator_id:
                            description: ID of the Operator
                            type: integer
                            readOnly: true
                          operator_uuid:
                            description: Uuid of the Operator
                            type: string
                            format: uuid
                            readOnly: true
                          full_name:
                            type: string
                          email:
                            type: string
                            format: email
                          phone:
                            type:
                              - string
                              - 'null'
                          cellphone:
                            type:
                              - string
                              - 'null'
                          account:
                            description: Type of account which determines the access permission level.
                            type: string
                            enum:
                              - admin
                              - manager
                              - technician
                              - operator
                              - reporter
                          language:
                            type: string
                            enum:
                              - ar
                              - ca
                              - da_dk
                              - en
                              - es
                              - fr_fr
                              - pl_pl
                              - pt_br
                              - pt_pt
                              - ko
                              - zh_cn
                              - nl_nl
                              - de_de
                          cost_per_hour:
                            type: number
                            minimum: 0
                            examples:
                              - 10
                          warehouse_id:
                            description: ID of the warehouse associated to the Operator by default.
                            type: integer
                          entity_id:
                            type: integer
                            readOnly: true
                          timezone:
                            description: >
                              Valid PHP timezone identifier. See the full list here:
                              https://www.php.net/manual/en/timezones.php.
                            type: string
                            examples:
                              - Europe/Lisbon
                          is_from_network:
                            type: boolean
                          created_at:
                            type: string
                            format: date-time
                          phone_country_code:
                            type: string
                            examples:
                              - US
                          is_first_web_login:
                            type:
                              - boolean
                              - 'null'
                            readOnly: true
                          status:
                            type: string
                            enum:
                              - WORKING
                              - AVAILABLE
                              - OFFLINE
                            examples:
                              - WORKING
                      meta:
                        type: object
                        properties:
                          custom_fields:
                            type:
                              - object
                              - 'null'
                            additionalProperties:
                              oneOf:
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - SELECT
                                      examples:
                                        - SELECT
                                    value:
                                      description: The current values of the Custom Field in this resource
                                      type:
                                        - array
                                        - 'null'
                                      items:
                                        type: object
                                        properties:
                                          option_id:
                                            description: The ID of the selected option
                                            type: integer
                                            examples:
                                              - 123
                                          option_code:
                                            description: The code of the selected option
                                            type:
                                              - string
                                              - 'null'
                                            examples:
                                              - OP01
                                          value:
                                            description: The value of the selected option
                                            type: string
                                            examples:
                                              - My Option 1
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: The type settings for the Custom Field
                                          type: object
                                          properties:
                                            allow_multiple_selection:
                                              description: Indicates if the Custom Field supports selecting multiple values
                                              type: boolean
                                              examples:
                                                - true
                                            managed_by_integrations:
                                              description: Indicates if the Custom Field options are only managed by integrations
                                              type: boolean
                                              examples:
                                                - true
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - TEXT
                                      examples:
                                        - TEXT
                                    value:
                                      description: The current value of the Custom Field in this resource
                                      type:
                                        - string
                                        - 'null'
                                      examples:
                                        - abc
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: >-
                                            The type settings for the Custom Field (Empty for Custom Fields of type
                                            TEXT)
                                          type: object
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - BOOLEAN
                                      examples:
                                        - BOOLEAN
                                    value:
                                      description: The current value of the Custom Field in this resource
                                      type:
                                        - boolean
                                        - 'null'
                                      examples:
                                        - true
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: >-
                                            The type settings for the Custom Field (There are none for the Custom Field
                                            Boolean type)
                                          type: object
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - RELATIONSHIP
                                      examples:
                                        - RELATIONSHIP
                                    value:
                                      description: The current values of the Custom Field in this resource
                                      type:
                                        - array
                                        - 'null'
                                      items:
                                        type: object
                                        properties:
                                          related_to_type:
                                            description: The type of object that is selected as the Custom Field Values
                                            type: string
                                            enum:
                                              - CLIENT
                                              - CONTACT
                                            examples:
                                              - CLIENT
                                          related_to_id:
                                            description: The ID of object that is selected as the Custom Field Value
                                            type: integer
                                            examples:
                                              - 123
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: The type settings for the Custom Field
                                          type: object
                                          properties:
                                            allow_multiple_selection:
                                              description: Indicates if the Custom Field allows multiple selection
                                              type: boolean
                                              examples:
                                                - false
                                            relationship_object:
                                              description: The type of object that is selected as the Custom Field Values
                                              type: string
                                              enum:
                                                - CLIENT
                                                - CONTACT
                                              examples:
                                                - CLIENT
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - DATETIME
                                      examples:
                                        - DATETIME
                                    value:
                                      description: The current value of the Custom Field in this resource
                                      type:
                                        - string
                                        - 'null'
                                      format: date-time
                                      examples:
                                        - '2025-12-12 12:39:00'
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: The type settings for the Custom Field
                                          type: object
                                          properties:
                                            allow_past_dates:
                                              description: Indicates if this Custom Field support past dates
                                              type: boolean
                                              examples:
                                                - false
                                            allow_future_dates:
                                              description: Indicates if this Custom Field support future dates
                                              type: boolean
                                              examples:
                                                - true
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - NUMBER
                                      examples:
                                        - NUMBER
                                    value:
                                      description: The current value of the Custom Field in this resource
                                      type:
                                        - integer
                                        - 'null'
                                      examples:
                                        - 12
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: The type settings for the Custom Field
                                          type: object
                                          properties:
                                            min:
                                              description: Indicates the minimum value for the Custom Field
                                              type:
                                                - integer
                                                - 'null'
                                              examples:
                                                - 1
                                            max:
                                              description: Indicates the maximum value for the Custom Field
                                              type:
                                                - integer
                                                - 'null'
                                              examples:
                                                - 3
                              discriminator:
                                propertyName: field_type
              examples:
                Example:
                  value:
                    type: operator
                    id: '43'
                    attributes:
                      operator_id: 43
                      operator_uuid: 0189da7e-6bcb-70fc-b60f-d66991131b14
                      full_name: John Doe
                      email: johndoe@example.com
                      phone: +351 999999999
                      cellphone: +351 888888888
                      account: admin
                      language: en
                      cost_per_hour: 25
                      warehouse_id: 1517
                      entity_id: 12
                      timezone: Europe/Lisbon
                      is_from_network: false
                      created_at: '2025-05-22T16:02:45.000000Z'
                      is_first_web_login: true
                      status: OFFLINE
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '403':
          description: Forbidden. The action can not be fulfilled.
          content:
            application/json:
              schema:
                title: 403 Forbidden
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 403
                      message:
                        type: string
                        examples:
                          - Action unauthorized
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 403
                      message: Action unauthorized
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /other-costs:
    get:
      operationId: getOtherCosts
      tags:
        - Other Costs
      summary: List all Other Costs
      description: >-
        This endpoint allows you to list all Other Costs. Other Costs in Infraspeak refer to the type of costs that
        usually are not categorized as costs for physical materials (bought from suppliers) or costs for services
        (provided by 3rd party entities) to enable the corrective and preventive maintenance operations. Some examples
        of an Other Cost could be traveling costs (which can be measured in traveling duration or traveling distance),
        stay costs or meal costs.
      parameters:
        - name: expanded
          in: query
          description: Allows you to expand the available Other Cost relations.
          schema:
            type: string
            enum:
              - customClientPrices
              - entity
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      title: Other Cost
                      description: Other Cost model structure details
                      type: object
                      properties:
                        id:
                          description: The ID of the Other Cost
                          type: string
                          examples:
                            - '123'
                          readOnly: true
                        type:
                          description: Model type
                          type: string
                          enum:
                            - other-cost
                          examples:
                            - other-cost
                          readOnly: true
                        attributes:
                          type: object
                          properties:
                            other_cost_id:
                              description: The ID of the Other Cost
                              type: integer
                              examples:
                                - 123
                              readOnly: true
                            entity_id:
                              description: The ID of the Entity
                              type: integer
                              examples:
                                - 123
                              readOnly: true
                            input_type:
                              description: >-
                                The type of Other Cost. Different types of Other Costs have different associated fields.
                                Other Costs of type resource will measure its total cost based on how long (e.g. hours,
                                minutes) the resource is occupied. Other Costs of type distance will measure its total
                                cost based on how many units (e.g. meters, kilometers) are needed. Other Costs of type
                                interval and time_range will measure its total cost based on duration. Other Costs of
                                type currency will have a fixed cost manually defined for each operation. Other Costs of
                                type custom_unit_of_measurement will measure its total cost based on how many units
                                (e.g. m3, liters) are needed.
                              type: string
                              enum:
                                - currency
                                - distance
                                - interval
                                - time_range
                                - resource
                                - custom_unit_of_measurement
                              examples:
                                - currency
                            name:
                              description: The name (or description) of the Other Cost
                              type: string
                              examples:
                                - Contractual Labor
                            failure:
                              description: >-
                                Indicates if the Other Cost can be included in costs for Corrective Maintenance (Work
                                Orders)
                              type: boolean
                              examples:
                                - true
                            schedule_work:
                              description: >-
                                Indicates if the Other Cost can be included in costs for Preventive Maintenance (Planned
                                Job Orders)
                              type:
                                - boolean
                                - 'null'
                              examples:
                                - true
                            operator:
                              description: >-
                                Indicates if the Other Cost can be included in individual costs for operators
                                (technicians)
                              type:
                                - boolean
                                - 'null'
                              examples:
                                - true
                            icon:
                              description: The icon to be presented for the Other Cost in Infraspeak platform.
                              type: string
                              enum:
                                - truck
                                - car
                                - clock-o
                                - bed
                                - user
                                - usd
                                - cutlery
                                - wrench
                              examples:
                                - truck
                            element:
                              description: Indicates if the Other Cost can be included in costs for Assets
                              type:
                                - boolean
                                - 'null'
                              examples:
                                - true
                            cost_per_unit:
                              description: >-
                                Cost per unit of the Other Cost. Specific for input_type "resource", "distance" or
                                "custom_unit_of_measurement"
                              type:
                                - number
                                - 'null'
                              examples:
                                - 2.5
                            default_sell_price:
                              description: >-
                                Default sell price of the Other Cost. Specific for input_type "resource", "distance" or
                                "custom_unit_of_measurement"
                              type:
                                - number
                                - 'null'
                              examples:
                                - 4
                            default_sell_vat:
                              description: >-
                                Default sale VAT/IVA percentage of the Other Cost. Specific for input_type "resource",
                                "distance" or "custom_unit_of_measurement"
                              type:
                                - number
                                - 'null'
                              examples:
                                - 23
                            unit:
                              description: >-
                                Unit of the Other Cost. Specific for input_type "resource", "distance" or
                                "custom_unit_of_measurement"
                              type:
                                - string
                                - 'null'
                        relationships:
                          description: The relationships of the Other Cost (Only present when expanded in the request)
                          type: object
                          properties:
                            customClientPrices:
                              description: The Custom Client Prices associated with the Other Cost
                              type: object
                            entity:
                              description: The Entity where the Other Cost belongs
                              type: object
                      required:
                        - id
                        - type
                        - attributes
                  included:
                    description: List of relationships to be included
                    type: array
                    items:
                      type: object
                    uniqueItems: true
                  meta:
                    title: Meta
                    description: Meta model structure details
                    type: object
                    properties:
                      pagination:
                        type: object
                        properties:
                          total:
                            description: Total items.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          count:
                            description: Total items returned for the current page.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          per_page:
                            description: Maximum number of records per page.
                            type: integer
                            minimum: 1
                            default: 200
                            examples:
                              - 1
                          current_page:
                            description: Number of the current page.
                            type: integer
                            minimum: 1
                            default: 1
                          total_pages:
                            description: Number of the total pages.
                            type: integer
                            minimum: 1
                            default: 1
                        required:
                          - total
                          - count
                          - per_page
                          - current_page
                          - total_pages
                  links:
                    title: Response Links on listing operations
                    description: >-
                      Requests that return multiple items include a `links` attribute, with links related to request's
                      context.
                    type: object
                    properties:
                      self:
                        description: Current response link.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      first:
                        description: Link to the first page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      last:
                        description: Link to the previous page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      next:
                        description: Link to the next page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                    required:
                      - self
                      - first
                      - last
              examples:
                Example:
                  value:
                    data:
                      - type: other-cost
                        id: '123'
                        attributes:
                          other_cost_id: 123
                          entity_id: 12
                          input_type: currency
                          name: Parking
                          failure: true
                          schedule_work: true
                          operator: true
                          icon: car
                          element: true
                          default_sell_price: 0
                          default_sell_vat: 0
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
    post:
      operationId: createOtherCost
      tags:
        - Other Costs
      summary: Create a Other Cost
      description: >-
        This endpoint allows you to create an Other Cost. Only users with the role "admin" or "manager" can perform this
        operation.
      requestBody:
        content:
          application/json:
            schema:
              description: Other Cost payload
              type: object
              properties:
                name:
                  description: The name (or description) of the Other Cost
                  type: string
                  examples:
                    - Contractual Labor
                input_type:
                  description: >-
                    The type of Other Cost. Different types of Other Costs have different associated fields. Other Costs
                    of type resource will measure its total cost based on how long (e.g. hours, minutes) the resource is
                    occupied. Other Costs of type distance will measure its total cost based on how many units (e.g.
                    meters, kilometers) are needed. Other Costs of type interval and time_range will measure its total
                    cost based on duration. Other Costs of type currency will have a fixed cost manually defined for
                    each operation. Other Costs of type custom_unit_of_measurement will measure its total cost based on
                    how many units (e.g. m3, liters) are needed.
                  type: string
                  enum:
                    - currency
                    - distance
                    - interval
                    - time_range
                    - resource
                    - custom_unit_of_measurement
                  examples:
                    - currency
                icon:
                  description: The icon to be presented for the Other Cost in Infraspeak platform.
                  type: string
                  enum:
                    - truck
                    - car
                    - clock-o
                    - bed
                    - user
                    - usd
                    - cutlery
                    - wrench
                  examples:
                    - truck
                failure:
                  description: Indicates if the Other Cost can be included in costs for Corrective Maintenance (Work Orders).
                  type: boolean
                  examples:
                    - true
                schedule_work:
                  description: >-
                    Indicates if the Other Cost can be included in costs for Preventive Maintenance (Planned Job
                    Orders).
                  type:
                    - boolean
                    - 'null'
                  default: true
                  examples:
                    - true
                operator:
                  description: Indicates if the Other Cost can be included in individual costs for operators (technicians)
                  type:
                    - boolean
                    - 'null'
                  default: true
                  examples:
                    - true
                element:
                  description: Indicates if the Other Cost can be included in costs for Assets
                  type:
                    - boolean
                    - 'null'
                  default: true
                  examples:
                    - true
                cost_per_unit:
                  description: >-
                    Cost per unit of the Other Cost. Only applicable if input_type is "resource", "distance" or
                    "custom_unit_of_measurement"
                  type:
                    - number
                    - 'null'
                default_sell_price:
                  description: >-
                    Default sell price of the Other Cost.  Only applicable if input_type is "resource", "distance" or
                    "custom_unit_of_measurement"
                  type:
                    - number
                    - 'null'
                default_sell_vat:
                  description: >-
                    Default sale VAT/IVA percentage of the Other Cost. Only applicable if input_type is "resource",
                    "distance" or "custom_unit_of_measurement"
                  type:
                    - number
                    - 'null'
                unit:
                  description: >-
                    Unit of the Other Cost. Only applicable if input_type is "resource", "distance" or
                    "custom_unit_of_measurement"
                  type:
                    - string
                    - 'null'
              required:
                - name
                - input_type
                - failure
                - icon
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: Other Cost
                    description: Other Cost model structure details
                    type: object
                    properties:
                      id:
                        description: The ID of the Other Cost
                        type: string
                        examples:
                          - '123'
                        readOnly: true
                      type:
                        description: Model type
                        type: string
                        enum:
                          - other-cost
                        examples:
                          - other-cost
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          other_cost_id:
                            description: The ID of the Other Cost
                            type: integer
                            examples:
                              - 123
                            readOnly: true
                          entity_id:
                            description: The ID of the Entity
                            type: integer
                            examples:
                              - 123
                            readOnly: true
                          input_type:
                            description: >-
                              The type of Other Cost. Different types of Other Costs have different associated fields.
                              Other Costs of type resource will measure its total cost based on how long (e.g. hours,
                              minutes) the resource is occupied. Other Costs of type distance will measure its total
                              cost based on how many units (e.g. meters, kilometers) are needed. Other Costs of type
                              interval and time_range will measure its total cost based on duration. Other Costs of type
                              currency will have a fixed cost manually defined for each operation. Other Costs of type
                              custom_unit_of_measurement will measure its total cost based on how many units (e.g. m3,
                              liters) are needed.
                            type: string
                            enum:
                              - currency
                              - distance
                              - interval
                              - time_range
                              - resource
                              - custom_unit_of_measurement
                            examples:
                              - currency
                          name:
                            description: The name (or description) of the Other Cost
                            type: string
                            examples:
                              - Contractual Labor
                          failure:
                            description: >-
                              Indicates if the Other Cost can be included in costs for Corrective Maintenance (Work
                              Orders)
                            type: boolean
                            examples:
                              - true
                          schedule_work:
                            description: >-
                              Indicates if the Other Cost can be included in costs for Preventive Maintenance (Planned
                              Job Orders)
                            type:
                              - boolean
                              - 'null'
                            examples:
                              - true
                          operator:
                            description: >-
                              Indicates if the Other Cost can be included in individual costs for operators
                              (technicians)
                            type:
                              - boolean
                              - 'null'
                            examples:
                              - true
                          icon:
                            description: The icon to be presented for the Other Cost in Infraspeak platform.
                            type: string
                            enum:
                              - truck
                              - car
                              - clock-o
                              - bed
                              - user
                              - usd
                              - cutlery
                              - wrench
                            examples:
                              - truck
                          element:
                            description: Indicates if the Other Cost can be included in costs for Assets
                            type:
                              - boolean
                              - 'null'
                            examples:
                              - true
                          cost_per_unit:
                            description: >-
                              Cost per unit of the Other Cost. Specific for input_type "resource", "distance" or
                              "custom_unit_of_measurement"
                            type:
                              - number
                              - 'null'
                            examples:
                              - 2.5
                          default_sell_price:
                            description: >-
                              Default sell price of the Other Cost. Specific for input_type "resource", "distance" or
                              "custom_unit_of_measurement"
                            type:
                              - number
                              - 'null'
                            examples:
                              - 4
                          default_sell_vat:
                            description: >-
                              Default sale VAT/IVA percentage of the Other Cost. Specific for input_type "resource",
                              "distance" or "custom_unit_of_measurement"
                            type:
                              - number
                              - 'null'
                            examples:
                              - 23
                          unit:
                            description: >-
                              Unit of the Other Cost. Specific for input_type "resource", "distance" or
                              "custom_unit_of_measurement"
                            type:
                              - string
                              - 'null'
                      relationships:
                        description: The relationships of the Other Cost (Only present when expanded in the request)
                        type: object
                        properties:
                          customClientPrices:
                            description: The Custom Client Prices associated with the Other Cost
                            type: object
                          entity:
                            description: The Entity where the Other Cost belongs
                            type: object
                    required:
                      - id
                      - type
                      - attributes
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
      x-toolbox: true
  /other-costs/{otherCostId}:
    get:
      operationId: getOtherCost
      tags:
        - Other Costs
      summary: Get a Other Cost
      description: This endpoint allows you to retrieve a specific Other Cost.
      parameters:
        - name: otherCostId
          in: path
          description: The Other Cost ID
          required: true
          schema:
            type: string
        - name: expanded
          in: query
          description: Allows you to expand the available Other Cost relations.
          schema:
            type: string
            enum:
              - customClientPrices
              - entity
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: Other Cost
                    description: Other Cost model structure details
                    type: object
                    properties:
                      id:
                        description: The ID of the Other Cost
                        type: string
                        examples:
                          - '123'
                        readOnly: true
                      type:
                        description: Model type
                        type: string
                        enum:
                          - other-cost
                        examples:
                          - other-cost
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          other_cost_id:
                            description: The ID of the Other Cost
                            type: integer
                            examples:
                              - 123
                            readOnly: true
                          entity_id:
                            description: The ID of the Entity
                            type: integer
                            examples:
                              - 123
                            readOnly: true
                          input_type:
                            description: >-
                              The type of Other Cost. Different types of Other Costs have different associated fields.
                              Other Costs of type resource will measure its total cost based on how long (e.g. hours,
                              minutes) the resource is occupied. Other Costs of type distance will measure its total
                              cost based on how many units (e.g. meters, kilometers) are needed. Other Costs of type
                              interval and time_range will measure its total cost based on duration. Other Costs of type
                              currency will have a fixed cost manually defined for each operation. Other Costs of type
                              custom_unit_of_measurement will measure its total cost based on how many units (e.g. m3,
                              liters) are needed.
                            type: string
                            enum:
                              - currency
                              - distance
                              - interval
                              - time_range
                              - resource
                              - custom_unit_of_measurement
                            examples:
                              - currency
                          name:
                            description: The name (or description) of the Other Cost
                            type: string
                            examples:
                              - Contractual Labor
                          failure:
                            description: >-
                              Indicates if the Other Cost can be included in costs for Corrective Maintenance (Work
                              Orders)
                            type: boolean
                            examples:
                              - true
                          schedule_work:
                            description: >-
                              Indicates if the Other Cost can be included in costs for Preventive Maintenance (Planned
                              Job Orders)
                            type:
                              - boolean
                              - 'null'
                            examples:
                              - true
                          operator:
                            description: >-
                              Indicates if the Other Cost can be included in individual costs for operators
                              (technicians)
                            type:
                              - boolean
                              - 'null'
                            examples:
                              - true
                          icon:
                            description: The icon to be presented for the Other Cost in Infraspeak platform.
                            type: string
                            enum:
                              - truck
                              - car
                              - clock-o
                              - bed
                              - user
                              - usd
                              - cutlery
                              - wrench
                            examples:
                              - truck
                          element:
                            description: Indicates if the Other Cost can be included in costs for Assets
                            type:
                              - boolean
                              - 'null'
                            examples:
                              - true
                          cost_per_unit:
                            description: >-
                              Cost per unit of the Other Cost. Specific for input_type "resource", "distance" or
                              "custom_unit_of_measurement"
                            type:
                              - number
                              - 'null'
                            examples:
                              - 2.5
                          default_sell_price:
                            description: >-
                              Default sell price of the Other Cost. Specific for input_type "resource", "distance" or
                              "custom_unit_of_measurement"
                            type:
                              - number
                              - 'null'
                            examples:
                              - 4
                          default_sell_vat:
                            description: >-
                              Default sale VAT/IVA percentage of the Other Cost. Specific for input_type "resource",
                              "distance" or "custom_unit_of_measurement"
                            type:
                              - number
                              - 'null'
                            examples:
                              - 23
                          unit:
                            description: >-
                              Unit of the Other Cost. Specific for input_type "resource", "distance" or
                              "custom_unit_of_measurement"
                            type:
                              - string
                              - 'null'
                      relationships:
                        description: The relationships of the Other Cost (Only present when expanded in the request)
                        type: object
                        properties:
                          customClientPrices:
                            description: The Custom Client Prices associated with the Other Cost
                            type: object
                          entity:
                            description: The Entity where the Other Cost belongs
                            type: object
                    required:
                      - id
                      - type
                      - attributes
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
    delete:
      operationId: deleteOtherCost
      tags:
        - Other Costs
      summary: Delete a Other Cost
      description: >-
        This endpoint allows you to delete an Other Cost. Only users with the role "admin" or "manager" can perform this
        operation.
      parameters:
        - name: otherCostId
          in: path
          description: The Other Cost ID
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items: {}
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
    patch:
      operationId: updateOtherCost
      tags:
        - Other Costs
      summary: Update a Other Cost
      description: >-
        This endpoint allows you to update an Other Cost. Only users with the role "admin" or "manager" can perform this
        operation.
      parameters:
        - name: otherCostId
          in: path
          description: The Other Cost ID
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              description: Other Cost Patch payload
              type: object
              properties:
                name:
                  description: The name (or description) of the Other Cost
                  type: string
                  examples:
                    - Contractual Labor
                input_type:
                  description: >-
                    The type of Other Cost. Different types of Other Costs have different associated fields. Other Costs
                    of type resource will measure its total cost based on how long (e.g. hours, minutes) the resource is
                    occupied. Other Costs of type distance will measure its total cost based on how many units (e.g.
                    meters, kilometers) are needed. Other Costs of type interval and time_range will measure its total
                    cost based on duration. Other Costs of type currency will have a fixed cost manually defined for
                    each operation. Other Costs of type custom_unit_of_measurement will measure its total cost based on
                    how many units (e.g. m3, liters) are needed.
                  type: string
                  enum:
                    - currency
                    - distance
                    - interval
                    - time_range
                    - resource
                    - custom_unit_of_measurement
                  examples:
                    - currency
                failure:
                  description: Indicates if the Other Cost can be included in costs for Corrective Maintenance (Work Orders)
                  type: boolean
                  examples:
                    - true
                schedule_work:
                  description: Indicates if the Other Cost can be included in costs for Preventive Maintenance (Planned Job Orders)
                  type:
                    - boolean
                    - 'null'
                  examples:
                    - true
                operator:
                  description: Indicates if the Other Cost can be included in individual costs for operators (technicians)
                  type:
                    - boolean
                    - 'null'
                  examples:
                    - true
                element:
                  description: Indicates if the Other Cost can be included in costs for Assets
                  type:
                    - boolean
                    - 'null'
                  examples:
                    - true
                icon:
                  description: The icon to be presented for the Other Cost in Infraspeak platform.
                  type: string
                  enum:
                    - truck
                    - car
                    - clock-o
                    - bed
                    - user
                    - usd
                    - cutlery
                    - wrench
                  examples:
                    - truck
                cost_per_unit:
                  description: >-
                    Cost per unit of the Other Cost. Only applicable if input_type is "resource", "distance" or
                    "custom_unit_of_measurement"
                  type:
                    - number
                    - 'null'
                default_sell_price:
                  description: >-
                    Default sell price of the Other Cost. Only applicable if input_type is "resource", "distance" or
                    "custom_unit_of_measurement"
                  type:
                    - number
                    - 'null'
                default_sell_vat:
                  description: >-
                    Default sale VAT/IVA percentage of the Other Cost. Only applicable if input_type is "resource",
                    "distance" or "custom_unit_of_measurement"
                  type:
                    - number
                    - 'null'
                unit:
                  description: >-
                    Unit of the Other Cost. Only applicable if input_type is "resource", "distance" or
                    "custom_unit_of_measurement"
                  type:
                    - string
                    - 'null'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: Other Cost
                    description: Other Cost model structure details
                    type: object
                    properties:
                      id:
                        description: The ID of the Other Cost
                        type: string
                        examples:
                          - '123'
                        readOnly: true
                      type:
                        description: Model type
                        type: string
                        enum:
                          - other-cost
                        examples:
                          - other-cost
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          other_cost_id:
                            description: The ID of the Other Cost
                            type: integer
                            examples:
                              - 123
                            readOnly: true
                          entity_id:
                            description: The ID of the Entity
                            type: integer
                            examples:
                              - 123
                            readOnly: true
                          input_type:
                            description: >-
                              The type of Other Cost. Different types of Other Costs have different associated fields.
                              Other Costs of type resource will measure its total cost based on how long (e.g. hours,
                              minutes) the resource is occupied. Other Costs of type distance will measure its total
                              cost based on how many units (e.g. meters, kilometers) are needed. Other Costs of type
                              interval and time_range will measure its total cost based on duration. Other Costs of type
                              currency will have a fixed cost manually defined for each operation. Other Costs of type
                              custom_unit_of_measurement will measure its total cost based on how many units (e.g. m3,
                              liters) are needed.
                            type: string
                            enum:
                              - currency
                              - distance
                              - interval
                              - time_range
                              - resource
                              - custom_unit_of_measurement
                            examples:
                              - currency
                          name:
                            description: The name (or description) of the Other Cost
                            type: string
                            examples:
                              - Contractual Labor
                          failure:
                            description: >-
                              Indicates if the Other Cost can be included in costs for Corrective Maintenance (Work
                              Orders)
                            type: boolean
                            examples:
                              - true
                          schedule_work:
                            description: >-
                              Indicates if the Other Cost can be included in costs for Preventive Maintenance (Planned
                              Job Orders)
                            type:
                              - boolean
                              - 'null'
                            examples:
                              - true
                          operator:
                            description: >-
                              Indicates if the Other Cost can be included in individual costs for operators
                              (technicians)
                            type:
                              - boolean
                              - 'null'
                            examples:
                              - true
                          icon:
                            description: The icon to be presented for the Other Cost in Infraspeak platform.
                            type: string
                            enum:
                              - truck
                              - car
                              - clock-o
                              - bed
                              - user
                              - usd
                              - cutlery
                              - wrench
                            examples:
                              - truck
                          element:
                            description: Indicates if the Other Cost can be included in costs for Assets
                            type:
                              - boolean
                              - 'null'
                            examples:
                              - true
                          cost_per_unit:
                            description: >-
                              Cost per unit of the Other Cost. Specific for input_type "resource", "distance" or
                              "custom_unit_of_measurement"
                            type:
                              - number
                              - 'null'
                            examples:
                              - 2.5
                          default_sell_price:
                            description: >-
                              Default sell price of the Other Cost. Specific for input_type "resource", "distance" or
                              "custom_unit_of_measurement"
                            type:
                              - number
                              - 'null'
                            examples:
                              - 4
                          default_sell_vat:
                            description: >-
                              Default sale VAT/IVA percentage of the Other Cost. Specific for input_type "resource",
                              "distance" or "custom_unit_of_measurement"
                            type:
                              - number
                              - 'null'
                            examples:
                              - 23
                          unit:
                            description: >-
                              Unit of the Other Cost. Specific for input_type "resource", "distance" or
                              "custom_unit_of_measurement"
                            type:
                              - string
                              - 'null'
                      relationships:
                        description: The relationships of the Other Cost (Only present when expanded in the request)
                        type: object
                        properties:
                          customClientPrices:
                            description: The Custom Client Prices associated with the Other Cost
                            type: object
                          entity:
                            description: The Entity where the Other Cost belongs
                            type: object
                    required:
                      - id
                      - type
                      - attributes
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /problems:
    get:
      operationId: getProblemAreas
      tags:
        - Problems
      summary: List all Problem Areas
      description: >
        Retrieves a list of all available Problem Areas.

        A Problem Area represents a broad category used to group related types of issues that may occur in a facility,
        asset, or service environment. These areas provide structure and context when classifying problems and are
        typically used for organizing and filtering Problem Types during issue reporting, tracking, or resolution
        workflows.

        Problem Areas are not directly actionable but serve as logical containers for related Problem Types.

        **Examples**:
          - "HVAC" – heating, ventilation, and air conditioning
          - "Electric" – electrical and power-related issues
          - "Plumbing" – water systems, leaks, and drainage
          - "Housekeeping" – cleaning, restocking, or general maintenance
      parameters:
        - name: filter[client_id]
          in: query
          description: Filter Problem Areas by client. Only returns Problem Areas that are accessible to the specified client.
          required: false
          schema:
            type: integer
        - name: filter[network_only_with_client]
          in: query
          description: >-
            Filter Problem Areas from Network without Client. Only returns Problem Areas from Network that belong to the
            specified client.
          required: false
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      title: Problem Area
                      description: Problem Area model structure details
                      type: object
                      properties:
                        id:
                          description: ID of the Problem Area
                          type: string
                          examples:
                            - '888'
                          readOnly: true
                        type:
                          description: Model type
                          type: string
                          enum:
                            - problem_area
                          readOnly: true
                        attributes:
                          type: object
                          properties:
                            problem_id:
                              description: Unique identifier of the Problem Area
                              type: integer
                              examples:
                                - 888
                              readOnly: true
                            name:
                              description: Name of the Problem Area
                              type: string
                              examples:
                                - Electric
                              readOnly: true
                            full_name:
                              description: Full name of the Problem Area
                              type: string
                              examples:
                                - Electric - Electric
                              readOnly: true
                            description:
                              description: Additional information
                              type:
                                - string
                                - 'null'
                              examples:
                                - Area of problems related to electricity
                            entity_id:
                              description: The ID of the entity that this problem area belongs to
                              type: integer
                              examples:
                                - 1
                              readOnly: true
                            created_at:
                              description: The date and time when the problem area was created
                              type:
                                - string
                                - 'null'
                              format: date-time
                              examples:
                                - '2022-10-06 11:35:28'
                              readOnly: true
                            updated_at:
                              description: The date and time when the problem area was last updated
                              type:
                                - string
                                - 'null'
                              format: date-time
                              examples:
                                - '2022-10-06 11:35:28'
                              readOnly: true
                            has_network_mapping:
                              description: >-
                                Specifies if this problem area is shared and has an established mapping to a
                                corresponding entity in an external network
                              type: boolean
                              examples:
                                - false
                              readOnly: true
                            is_from_network:
                              description: Specifies if this problem area is shared and has been imported from an external network
                              type: boolean
                              examples:
                                - false
                              readOnly: true
                          required:
                            - problem_id
                            - name
                            - full_name
                            - description
                            - entity_id
                            - created_at
                            - updated_at
                            - has_network_mapping
                            - is_from_network
                        relationships:
                          type: object
                          properties:
                            children:
                              type: object
                              properties:
                                data:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - problem_type
                                        readOnly: true
                                      id:
                                        type: string
                                        examples:
                                          - '123'
                                        readOnly: true
                      required:
                        - id
                        - type
                        - attributes
                  included:
                    description: List of relationships to be included
                    type: array
                    items:
                      title: Problem Type
                      description: Problem Type model structure details
                      type: object
                      properties:
                        id:
                          description: ID of the Problem Type
                          type: string
                          readOnly: true
                        type:
                          description: Model type
                          type: string
                          enum:
                            - problem_type
                          readOnly: true
                        attributes:
                          type: object
                          properties:
                            problem_id:
                              description: Unique identifier of the problem type.
                              type: integer
                              examples:
                                - 123
                              readOnly: true
                            name:
                              description: Name of the problem type.
                              type: string
                              examples:
                                - Power outage
                              readOnly: true
                            full_name:
                              description: Name of the problem area concatenated by hyphen with problem name.
                              type: string
                              examples:
                                - Electric - Power outage
                              readOnly: true
                            description:
                              description: Additional information
                              type:
                                - string
                                - 'null'
                              examples:
                                - Power outage with no electricity supply
                            parent_id:
                              description: ID of the problem area.
                              type: integer
                              examples:
                                - 1
                              readOnly: true
                            entity_id:
                              description: The ID of the entity that this problem type belongs to.
                              type: integer
                              examples:
                                - 1
                              readOnly: true
                            created_at:
                              description: The date and time when the problem area was created
                              type: string
                              format: date-time
                              examples:
                                - '2022-10-06 11:35:28'
                              readOnly: true
                            updated_at:
                              description: The date and time when the problem area was last updated
                              type: string
                              format: date-time
                              examples:
                                - '2022-10-06 11:35:28'
                              readOnly: true
                            has_network_mapping:
                              description: >-
                                Specifies if this problem area is shared and has an established mapping to a
                                corresponding entity in an external network
                              type: boolean
                              examples:
                                - false
                              readOnly: true
                            is_from_network:
                              description: Specifies if this problem area is shared and has been imported from an external network
                              type: boolean
                              examples:
                                - false
                              readOnly: true
                        relationships:
                          type: object
                          properties:
                            parent:
                              type: object
                              properties:
                                data:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - problem_area
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                      required:
                        - id
                        - type
                        - attributes
                    uniqueItems: true
                  meta:
                    title: Meta
                    description: Meta model structure details
                    type: object
                    properties:
                      pagination:
                        type: object
                        properties:
                          total:
                            description: Total items.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          count:
                            description: Total items returned for the current page.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          per_page:
                            description: Maximum number of records per page.
                            type: integer
                            minimum: 1
                            default: 200
                            examples:
                              - 1
                          current_page:
                            description: Number of the current page.
                            type: integer
                            minimum: 1
                            default: 1
                          total_pages:
                            description: Number of the total pages.
                            type: integer
                            minimum: 1
                            default: 1
                        required:
                          - total
                          - count
                          - per_page
                          - current_page
                          - total_pages
                  links:
                    title: Response Links on listing operations
                    description: >-
                      Requests that return multiple items include a `links` attribute, with links related to request's
                      context.
                    type: object
                    properties:
                      self:
                        description: Current response link.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      first:
                        description: Link to the first page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      last:
                        description: Link to the previous page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      next:
                        description: Link to the next page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                    required:
                      - self
                      - first
                      - last
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /problems/{problemAreaId}:
    get:
      operationId: getProblemArea
      tags:
        - Problems
      summary: Get a Problem Area
      description: >
        Retrieves a specific Problem Area by its ID. Problem Areas are used to classify related types of issues in a
        facility, asset, or service environment. They help structure issue categories and are used to organize Problem
        Types.

        This endpoint returns the details of the specified Problem Area.
      parameters:
        - name: problemAreaId
          in: path
          description: The Problem Area ID
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: Problem Area
                    description: Problem Area model structure details
                    type: object
                    properties:
                      id:
                        description: ID of the Problem Area
                        type: string
                        examples:
                          - '888'
                        readOnly: true
                      type:
                        description: Model type
                        type: string
                        enum:
                          - problem_area
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          problem_id:
                            description: Unique identifier of the Problem Area
                            type: integer
                            examples:
                              - 888
                            readOnly: true
                          name:
                            description: Name of the Problem Area
                            type: string
                            examples:
                              - Electric
                            readOnly: true
                          full_name:
                            description: Full name of the Problem Area
                            type: string
                            examples:
                              - Electric - Electric
                            readOnly: true
                          description:
                            description: Additional information
                            type:
                              - string
                              - 'null'
                            examples:
                              - Area of problems related to electricity
                          entity_id:
                            description: The ID of the entity that this problem area belongs to
                            type: integer
                            examples:
                              - 1
                            readOnly: true
                          created_at:
                            description: The date and time when the problem area was created
                            type:
                              - string
                              - 'null'
                            format: date-time
                            examples:
                              - '2022-10-06 11:35:28'
                            readOnly: true
                          updated_at:
                            description: The date and time when the problem area was last updated
                            type:
                              - string
                              - 'null'
                            format: date-time
                            examples:
                              - '2022-10-06 11:35:28'
                            readOnly: true
                          has_network_mapping:
                            description: >-
                              Specifies if this problem area is shared and has an established mapping to a corresponding
                              entity in an external network
                            type: boolean
                            examples:
                              - false
                            readOnly: true
                          is_from_network:
                            description: Specifies if this problem area is shared and has been imported from an external network
                            type: boolean
                            examples:
                              - false
                            readOnly: true
                        required:
                          - problem_id
                          - name
                          - full_name
                          - description
                          - entity_id
                          - created_at
                          - updated_at
                          - has_network_mapping
                          - is_from_network
                      relationships:
                        type: object
                        properties:
                          children:
                            type: object
                            properties:
                              data:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - problem_type
                                      readOnly: true
                                    id:
                                      type: string
                                      examples:
                                        - '123'
                                      readOnly: true
                    required:
                      - id
                      - type
                      - attributes
              examples:
                Example:
                  value:
                    data:
                      type: problem_area
                      attributes:
                        problem_id: 123
                        name: Electric
                        description: Area of problems related to electricity
                        full_name: Electric
                        entity_id: 1
                        created_at: '2022-10-06 11:35:28'
                        updated_at: '2022-10-06 11:35:28'
                        has_network_mapping: false
                        is_from_network: false
                        all_users: true
                        all_clients: true
                      id: '123'
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /problems/{problemAreaId}/subproblems:
    get:
      operationId: getProblemTypes
      tags:
        - Problems
      summary: List all Problem Types
      description: |
        A Problem Type represents a specific issue that may occur and can be reported.
        Each Problem Type belongs to a broader Problem Area, which is used to organize and group related issues.
        **Examples**:
          - "Power outage" (belongs to the "Electric" problem area)
          - "Water leakage" (belongs to the "Plumbing" problem area)
          - "No heating" (belongs to the "HVAC" problem area)
          - "Unclean room" (belongs to the "Housekeeping" problem area)
      parameters:
        - name: problemAreaId
          in: path
          description: The Problem Area ID
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      title: Problem Type
                      description: Problem Type model structure details
                      type: object
                      properties:
                        id:
                          description: ID of the Problem Type
                          type: string
                          readOnly: true
                        type:
                          description: Model type
                          type: string
                          enum:
                            - problem_type
                          readOnly: true
                        attributes:
                          type: object
                          properties:
                            problem_id:
                              description: Unique identifier of the problem type.
                              type: integer
                              examples:
                                - 123
                              readOnly: true
                            name:
                              description: Name of the problem type.
                              type: string
                              examples:
                                - Power outage
                              readOnly: true
                            full_name:
                              description: Name of the problem area concatenated by hyphen with problem name.
                              type: string
                              examples:
                                - Electric - Power outage
                              readOnly: true
                            description:
                              description: Additional information
                              type:
                                - string
                                - 'null'
                              examples:
                                - Power outage with no electricity supply
                            parent_id:
                              description: ID of the problem area.
                              type: integer
                              examples:
                                - 1
                              readOnly: true
                            entity_id:
                              description: The ID of the entity that this problem type belongs to.
                              type: integer
                              examples:
                                - 1
                              readOnly: true
                            created_at:
                              description: The date and time when the problem area was created
                              type: string
                              format: date-time
                              examples:
                                - '2022-10-06 11:35:28'
                              readOnly: true
                            updated_at:
                              description: The date and time when the problem area was last updated
                              type: string
                              format: date-time
                              examples:
                                - '2022-10-06 11:35:28'
                              readOnly: true
                            has_network_mapping:
                              description: >-
                                Specifies if this problem area is shared and has an established mapping to a
                                corresponding entity in an external network
                              type: boolean
                              examples:
                                - false
                              readOnly: true
                            is_from_network:
                              description: Specifies if this problem area is shared and has been imported from an external network
                              type: boolean
                              examples:
                                - false
                              readOnly: true
                        relationships:
                          type: object
                          properties:
                            parent:
                              type: object
                              properties:
                                data:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - problem_area
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                      required:
                        - id
                        - type
                        - attributes
                  included:
                    description: List of relationships to be included
                    type: array
                    items:
                      title: Problem Area
                      description: Problem Area model structure details
                      type: object
                      properties:
                        id:
                          description: ID of the Problem Area
                          type: string
                          examples:
                            - '888'
                          readOnly: true
                        type:
                          description: Model type
                          type: string
                          enum:
                            - problem_area
                          readOnly: true
                        attributes:
                          type: object
                          properties:
                            problem_id:
                              description: Unique identifier of the Problem Area
                              type: integer
                              examples:
                                - 888
                              readOnly: true
                            name:
                              description: Name of the Problem Area
                              type: string
                              examples:
                                - Electric
                              readOnly: true
                            full_name:
                              description: Full name of the Problem Area
                              type: string
                              examples:
                                - Electric - Electric
                              readOnly: true
                            description:
                              description: Additional information
                              type:
                                - string
                                - 'null'
                              examples:
                                - Area of problems related to electricity
                            entity_id:
                              description: The ID of the entity that this problem area belongs to
                              type: integer
                              examples:
                                - 1
                              readOnly: true
                            created_at:
                              description: The date and time when the problem area was created
                              type:
                                - string
                                - 'null'
                              format: date-time
                              examples:
                                - '2022-10-06 11:35:28'
                              readOnly: true
                            updated_at:
                              description: The date and time when the problem area was last updated
                              type:
                                - string
                                - 'null'
                              format: date-time
                              examples:
                                - '2022-10-06 11:35:28'
                              readOnly: true
                            has_network_mapping:
                              description: >-
                                Specifies if this problem area is shared and has an established mapping to a
                                corresponding entity in an external network
                              type: boolean
                              examples:
                                - false
                              readOnly: true
                            is_from_network:
                              description: Specifies if this problem area is shared and has been imported from an external network
                              type: boolean
                              examples:
                                - false
                              readOnly: true
                          required:
                            - problem_id
                            - name
                            - full_name
                            - description
                            - entity_id
                            - created_at
                            - updated_at
                            - has_network_mapping
                            - is_from_network
                        relationships:
                          type: object
                          properties:
                            children:
                              type: object
                              properties:
                                data:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - problem_type
                                        readOnly: true
                                      id:
                                        type: string
                                        examples:
                                          - '123'
                                        readOnly: true
                      required:
                        - id
                        - type
                        - attributes
                    uniqueItems: true
                  meta:
                    title: Meta
                    description: Meta model structure details
                    type: object
                    properties:
                      pagination:
                        type: object
                        properties:
                          total:
                            description: Total items.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          count:
                            description: Total items returned for the current page.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          per_page:
                            description: Maximum number of records per page.
                            type: integer
                            minimum: 1
                            default: 200
                            examples:
                              - 1
                          current_page:
                            description: Number of the current page.
                            type: integer
                            minimum: 1
                            default: 1
                          total_pages:
                            description: Number of the total pages.
                            type: integer
                            minimum: 1
                            default: 1
                        required:
                          - total
                          - count
                          - per_page
                          - current_page
                          - total_pages
                  links:
                    title: Response Links on listing operations
                    description: >-
                      Requests that return multiple items include a `links` attribute, with links related to request's
                      context.
                    type: object
                    properties:
                      self:
                        description: Current response link.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      first:
                        description: Link to the first page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      last:
                        description: Link to the previous page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      next:
                        description: Link to the next page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                    required:
                      - self
                      - first
                      - last
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /requests/{requestId}:
    get:
      operationId: getRequest
      tags:
        - Requests
      summary: Get a Request
      description: >
        This endpoint allows users to consult a specific Request.

        These requests are generated by technicians in the mobile app and can be approved or rejected by manager in the
        web.
      parameters:
        - name: requestId
          in: path
          description: Request Id
          required: true
          schema:
            type: string
        - name: expanded
          in: query
          description: >
            Allows you to expand the available Request relations. RelatedTo will be a Failure (Work Order) or Scheduled
            Work (Planned Job Order)

            Responsibles will be a list of Operators.
          schema:
            type: string
            enum:
              - relatedTo
              - operator
              - responsibles
              - requestMaterials
              - files
      responses:
        '200':
          description: Successful response with request details
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: Request
                    description: Request model structure details
                    type: object
                    properties:
                      id:
                        description: ID of the Request.
                        type: string
                        readOnly: true
                      type:
                        description: Model type
                        type: string
                        enum:
                          - request
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          entity_id:
                            type: integer
                          description:
                            description: Description of the Request.
                            type: string
                          type:
                            description: Type of the Request.
                            type: string
                            enum:
                              - MATERIAL_REQUEST
                              - SERVICE_REQUEST
                              - OTHERS
                            readOnly: true
                          date_created:
                            description: Creation date of the Request.
                            type: string
                            format: date-time
                            examples:
                              - '2020-08-28T17:12:00.000Z'
                          date_updated:
                            description: Last update date of the Request.
                            type: string
                            format: date-time
                            examples:
                              - '2020-08-28T17:12:00.000Z'
                          operator_id:
                            description: ID of the operator that created the Request.
                            type: integer
                          priority:
                            description: Request priority number, being 1 the lowest priority and 4 the highest priority.
                            type: integer
                            enum:
                              - 1
                              - 2
                              - 3
                              - 4
                          related_to_id:
                            description: ID of the object (failure or scheduled work) related to the quote.
                            type: integer
                          related_to_type:
                            description: Type of object related to the quote.
                            type: string
                            enum:
                              - FAILURE
                              - SCHEDULED_WORK
                            examples:
                              - FAILURE
                          request_id:
                            description: ID of the Request.
                            type: integer
                            readOnly: true
                          state:
                            description: State of the Request.
                            type: string
                            enum:
                              - PENDING
                              - RUNNING
                              - COMPLETED
                              - CANCELLED
                            default: PENDING
                            examples:
                              - PENDING
                          stock_consumed:
                            description: Indicates if the the stock was consumed, with the Status change to `COMPLETED`.
                            type: boolean
                            default: false
              examples:
                Example:
                  value:
                    data:
                      type: request
                      id: '3807'
                      attributes:
                        request_id: 3807
                        type: MATERIAL_REQUEST
                        state: COMPLETED
                        priority: 2
                        related_to_type: FAILURE
                        related_to_id: 681660
                        description: Material request for Work Order
                        stock_consumed: true
                        operator_id: 4228
                        entity_id: 12
                        date_created: '2022-09-27 21:40:33'
                        date_updated: '2022-09-27 21:43:23'
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /sales/buy-orders:
    get:
      operationId: getBuyOrders
      tags:
        - Buy Orders
      summary: List all Buy Orders
      description: This endpoint allows you to list all Buy Orders.
      parameters: []
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      title: Buy Order
                      description: Buy Order model structure details
                      type: object
                      properties:
                        id:
                          description: ID of the Buy Order.
                          type: string
                          readOnly: true
                        type:
                          description: Model type
                          type: string
                          enum:
                            - buy_order
                          readOnly: true
                        attributes:
                          type: object
                          properties:
                            entity_id:
                              type: integer
                              readOnly: true
                            type:
                              description: Type of Buy Order.
                              type: string
                              enum:
                                - MATERIAL
                                - SERVICE
                              readOnly: true
                            base_total:
                              description: The total base price of the Buy Order (including discount).
                              type:
                                - string
                                - 'null'
                              readOnly: true
                            code:
                              description: Code of the Buy Order.
                              type: string
                              readOnly: true
                            completed_at:
                              allOf:
                                - type:
                                    - string
                                    - 'null'
                                  pattern: >-
                                    ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                    ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                  examples:
                                    - '2021-07-21 18:38:00'
                                - description: Date Buy Order is Received (state transition to 'RECEIVED').
                                  readOnly: true
                                  examples:
                                    - '2021-07-22 18:38:00'
                            completed_by:
                              description: ID of the user who Received the Buy Order (state transition to 'RECEIVED').
                              type:
                                - integer
                                - 'null'
                              readOnly: true
                            created_by:
                              description: ID of the user who created the Buy Order
                              type:
                                - integer
                                - 'null'
                              readOnly: true
                            date_created:
                              allOf:
                                - type:
                                    - string
                                    - 'null'
                                  pattern: >-
                                    ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                    ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                  examples:
                                    - '2021-07-21 18:38:00'
                                - description: Date Buy Order is Created.
                                  readOnly: true
                            date_updated:
                              description: Date Buy Order was last updated.
                              type: string
                              readOnly: true
                              examples:
                                - '2021-07-21 18:38:00'
                            delivery_address:
                              description: Delivery Address of the Buy Order.
                              type:
                                - string
                                - 'null'
                            discount_total:
                              description: The total discount of the Buy Order.
                              type:
                                - string
                                - 'null'
                              readOnly: true
                            external_buy_id:
                              description: External ID of the Buy Order.
                              type:
                                - string
                                - 'null'
                            internal_buy_id:
                              description: Internal ID of the Buy Order.
                              type:
                                - string
                                - 'null'
                            observation:
                              description: Observations or notes of the Buy Order.
                              type:
                                - string
                                - 'null'
                            order_id:
                              description: ID of the Buy Order.
                              type: integer
                              readOnly: true
                            processed_at:
                              allOf:
                                - type:
                                    - string
                                    - 'null'
                                  pattern: >-
                                    ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                    ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                  examples:
                                    - '2021-07-21 18:38:00'
                                - description: Date Buy Order is started (state transition to 'CREATED').
                                  readOnly: true
                            processed_by:
                              description: ID of the user who started the Buy Order (state transition to 'CREATED').
                              type:
                                - integer
                                - 'null'
                              readOnly: true
                            related_to_id:
                              description: >-
                                ID of the object (failure or scheduled work) related to the Buy Order (required with
                                field related_to_type).
                              type:
                                - integer
                                - 'null'
                            related_to_type:
                              description: Type of object related to the Buy Order (required with field related_to_id).
                              type:
                                - string
                                - 'null'
                              enum:
                                - FAILURE
                                - SCHEDULED_WORK
                                - null
                                - ''
                            state:
                              description: State of the Buy Order.
                              type: string
                              enum:
                                - SAVED_AS_DRAFT
                                - CREATED
                                - RECEIVED_PARTIALLY
                                - RECEIVED
                                - CONFIRMED
                              default: SAVED_AS_DRAFT
                              examples:
                                - SAVED_AS_DRAFT
                            supplier_id:
                              description: >-
                                ID of the Supplier associated to the Buy Order. Required for type 'SERVICE' and state is
                                not 'SAVED_AS_DRAFT'.
                              type:
                                - integer
                                - 'null'
                            total_price:
                              description: The total price of the Sell Order (including VAT and discount)
                              type: number
                              readOnly: true
                            vat_total:
                              description: The total VAT of the Buy Order.
                              type:
                                - string
                                - 'null'
                              readOnly: true
                            warehouse_id:
                              description: >-
                                ID of the Warehouse associated to the Buy Order. Required for type 'MATERIAL' and state
                                is not 'SAVED_AS_DRAFT'.
                              type:
                                - integer
                                - 'null'
                        meta:
                          type: object
                          properties:
                            custom_fields:
                              type:
                                - object
                                - 'null'
                              additionalProperties:
                                oneOf:
                                  - type: object
                                    properties:
                                      id:
                                        description: The unique identifier for the Custom Field
                                        type: integer
                                        examples:
                                          - 123
                                      field_type:
                                        description: The type of the Custom Field
                                        type: string
                                        enum:
                                          - SELECT
                                        examples:
                                          - SELECT
                                      value:
                                        description: The current values of the Custom Field in this resource
                                        type:
                                          - array
                                          - 'null'
                                        items:
                                          type: object
                                          properties:
                                            option_id:
                                              description: The ID of the selected option
                                              type: integer
                                              examples:
                                                - 123
                                            option_code:
                                              description: The code of the selected option
                                              type:
                                                - string
                                                - 'null'
                                              examples:
                                                - OP01
                                            value:
                                              description: The value of the selected option
                                              type: string
                                              examples:
                                                - My Option 1
                                      configs:
                                        type: object
                                        properties:
                                          label:
                                            description: The label for the Custom Field
                                            type: string
                                            examples:
                                              - My field X
                                          code:
                                            description: The unique code for the Custom Field
                                            type: string
                                            examples:
                                              - C01
                                          required:
                                            description: Specifies if the Custom Field is required
                                            type: boolean
                                            examples:
                                              - true
                                          are_values_readonly:
                                            description: >-
                                              Specifies if the Custom Field values are read only (so only integrations
                                              can set them).
                                            type: boolean
                                            examples:
                                              - false
                                          archived_at:
                                            description: >-
                                              Indicates when the custom field was archived for this object type. Objects
                                              that belong to the archived type will still display the custom field value
                                              if it was configured before the archiving.
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-03-12 12:12:12'
                                          type_settings:
                                            description: The type settings for the Custom Field
                                            type: object
                                            properties:
                                              allow_multiple_selection:
                                                description: Indicates if the Custom Field supports selecting multiple values
                                                type: boolean
                                                examples:
                                                  - true
                                              managed_by_integrations:
                                                description: Indicates if the Custom Field options are only managed by integrations
                                                type: boolean
                                                examples:
                                                  - true
                                  - type: object
                                    properties:
                                      id:
                                        description: The unique identifier for the Custom Field
                                        type: integer
                                        examples:
                                          - 123
                                      field_type:
                                        description: The type of the Custom Field
                                        type: string
                                        enum:
                                          - TEXT
                                        examples:
                                          - TEXT
                                      value:
                                        description: The current value of the Custom Field in this resource
                                        type:
                                          - string
                                          - 'null'
                                        examples:
                                          - abc
                                      configs:
                                        type: object
                                        properties:
                                          label:
                                            description: The label for the Custom Field
                                            type: string
                                            examples:
                                              - My field X
                                          code:
                                            description: The unique code for the Custom Field
                                            type: string
                                            examples:
                                              - C01
                                          required:
                                            description: Specifies if the Custom Field is required
                                            type: boolean
                                            examples:
                                              - true
                                          are_values_readonly:
                                            description: >-
                                              Specifies if the Custom Field values are read only (so only integrations
                                              can set them).
                                            type: boolean
                                            examples:
                                              - false
                                          archived_at:
                                            description: >-
                                              Indicates when the custom field was archived for this object type. Objects
                                              that belong to the archived type will still display the custom field value
                                              if it was configured before the archiving.
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-03-12 12:12:12'
                                          type_settings:
                                            description: >-
                                              The type settings for the Custom Field (Empty for Custom Fields of type
                                              TEXT)
                                            type: object
                                  - type: object
                                    properties:
                                      id:
                                        description: The unique identifier for the Custom Field
                                        type: integer
                                        examples:
                                          - 123
                                      field_type:
                                        description: The type of the Custom Field
                                        type: string
                                        enum:
                                          - BOOLEAN
                                        examples:
                                          - BOOLEAN
                                      value:
                                        description: The current value of the Custom Field in this resource
                                        type:
                                          - boolean
                                          - 'null'
                                        examples:
                                          - true
                                      configs:
                                        type: object
                                        properties:
                                          label:
                                            description: The label for the Custom Field
                                            type: string
                                            examples:
                                              - My field X
                                          code:
                                            description: The unique code for the Custom Field
                                            type: string
                                            examples:
                                              - C01
                                          required:
                                            description: Specifies if the Custom Field is required
                                            type: boolean
                                            examples:
                                              - true
                                          are_values_readonly:
                                            description: >-
                                              Specifies if the Custom Field values are read only (so only integrations
                                              can set them).
                                            type: boolean
                                            examples:
                                              - false
                                          archived_at:
                                            description: >-
                                              Indicates when the custom field was archived for this object type. Objects
                                              that belong to the archived type will still display the custom field value
                                              if it was configured before the archiving.
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-03-12 12:12:12'
                                          type_settings:
                                            description: >-
                                              The type settings for the Custom Field (There are none for the Custom
                                              Field Boolean type)
                                            type: object
                                  - type: object
                                    properties:
                                      id:
                                        description: The unique identifier for the Custom Field
                                        type: integer
                                        examples:
                                          - 123
                                      field_type:
                                        description: The type of the Custom Field
                                        type: string
                                        enum:
                                          - RELATIONSHIP
                                        examples:
                                          - RELATIONSHIP
                                      value:
                                        description: The current values of the Custom Field in this resource
                                        type:
                                          - array
                                          - 'null'
                                        items:
                                          type: object
                                          properties:
                                            related_to_type:
                                              description: The type of object that is selected as the Custom Field Values
                                              type: string
                                              enum:
                                                - CLIENT
                                                - CONTACT
                                              examples:
                                                - CLIENT
                                            related_to_id:
                                              description: The ID of object that is selected as the Custom Field Value
                                              type: integer
                                              examples:
                                                - 123
                                      configs:
                                        type: object
                                        properties:
                                          label:
                                            description: The label for the Custom Field
                                            type: string
                                            examples:
                                              - My field X
                                          code:
                                            description: The unique code for the Custom Field
                                            type: string
                                            examples:
                                              - C01
                                          required:
                                            description: Specifies if the Custom Field is required
                                            type: boolean
                                            examples:
                                              - true
                                          are_values_readonly:
                                            description: >-
                                              Specifies if the Custom Field values are read only (so only integrations
                                              can set them).
                                            type: boolean
                                            examples:
                                              - false
                                          archived_at:
                                            description: >-
                                              Indicates when the custom field was archived for this object type. Objects
                                              that belong to the archived type will still display the custom field value
                                              if it was configured before the archiving.
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-03-12 12:12:12'
                                          type_settings:
                                            description: The type settings for the Custom Field
                                            type: object
                                            properties:
                                              allow_multiple_selection:
                                                description: Indicates if the Custom Field allows multiple selection
                                                type: boolean
                                                examples:
                                                  - false
                                              relationship_object:
                                                description: The type of object that is selected as the Custom Field Values
                                                type: string
                                                enum:
                                                  - CLIENT
                                                  - CONTACT
                                                examples:
                                                  - CLIENT
                                  - type: object
                                    properties:
                                      id:
                                        description: The unique identifier for the Custom Field
                                        type: integer
                                        examples:
                                          - 123
                                      field_type:
                                        description: The type of the Custom Field
                                        type: string
                                        enum:
                                          - DATETIME
                                        examples:
                                          - DATETIME
                                      value:
                                        description: The current value of the Custom Field in this resource
                                        type:
                                          - string
                                          - 'null'
                                        format: date-time
                                        examples:
                                          - '2025-12-12 12:39:00'
                                      configs:
                                        type: object
                                        properties:
                                          label:
                                            description: The label for the Custom Field
                                            type: string
                                            examples:
                                              - My field X
                                          code:
                                            description: The unique code for the Custom Field
                                            type: string
                                            examples:
                                              - C01
                                          required:
                                            description: Specifies if the Custom Field is required
                                            type: boolean
                                            examples:
                                              - true
                                          are_values_readonly:
                                            description: >-
                                              Specifies if the Custom Field values are read only (so only integrations
                                              can set them).
                                            type: boolean
                                            examples:
                                              - false
                                          archived_at:
                                            description: >-
                                              Indicates when the custom field was archived for this object type. Objects
                                              that belong to the archived type will still display the custom field value
                                              if it was configured before the archiving.
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-03-12 12:12:12'
                                          type_settings:
                                            description: The type settings for the Custom Field
                                            type: object
                                            properties:
                                              allow_past_dates:
                                                description: Indicates if this Custom Field support past dates
                                                type: boolean
                                                examples:
                                                  - false
                                              allow_future_dates:
                                                description: Indicates if this Custom Field support future dates
                                                type: boolean
                                                examples:
                                                  - true
                                  - type: object
                                    properties:
                                      id:
                                        description: The unique identifier for the Custom Field
                                        type: integer
                                        examples:
                                          - 123
                                      field_type:
                                        description: The type of the Custom Field
                                        type: string
                                        enum:
                                          - NUMBER
                                        examples:
                                          - NUMBER
                                      value:
                                        description: The current value of the Custom Field in this resource
                                        type:
                                          - integer
                                          - 'null'
                                        examples:
                                          - 12
                                      configs:
                                        type: object
                                        properties:
                                          label:
                                            description: The label for the Custom Field
                                            type: string
                                            examples:
                                              - My field X
                                          code:
                                            description: The unique code for the Custom Field
                                            type: string
                                            examples:
                                              - C01
                                          required:
                                            description: Specifies if the Custom Field is required
                                            type: boolean
                                            examples:
                                              - true
                                          are_values_readonly:
                                            description: >-
                                              Specifies if the Custom Field values are read only (so only integrations
                                              can set them).
                                            type: boolean
                                            examples:
                                              - false
                                          archived_at:
                                            description: >-
                                              Indicates when the custom field was archived for this object type. Objects
                                              that belong to the archived type will still display the custom field value
                                              if it was configured before the archiving.
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-03-12 12:12:12'
                                          type_settings:
                                            description: The type settings for the Custom Field
                                            type: object
                                            properties:
                                              min:
                                                description: Indicates the minimum value for the Custom Field
                                                type:
                                                  - integer
                                                  - 'null'
                                                examples:
                                                  - 1
                                              max:
                                                description: Indicates the maximum value for the Custom Field
                                                type:
                                                  - integer
                                                  - 'null'
                                                examples:
                                                  - 3
                                discriminator:
                                  propertyName: field_type
                  included:
                    description: List of relationships to be included
                    type: array
                    items:
                      type: object
                    uniqueItems: true
                  meta:
                    title: Meta
                    description: Meta model structure details
                    type: object
                    properties:
                      pagination:
                        type: object
                        properties:
                          total:
                            description: Total items.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          count:
                            description: Total items returned for the current page.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          per_page:
                            description: Maximum number of records per page.
                            type: integer
                            minimum: 1
                            default: 200
                            examples:
                              - 1
                          current_page:
                            description: Number of the current page.
                            type: integer
                            minimum: 1
                            default: 1
                          total_pages:
                            description: Number of the total pages.
                            type: integer
                            minimum: 1
                            default: 1
                        required:
                          - total
                          - count
                          - per_page
                          - current_page
                          - total_pages
                  links:
                    title: Response Links on listing operations
                    description: >-
                      Requests that return multiple items include a `links` attribute, with links related to request's
                      context.
                    type: object
                    properties:
                      self:
                        description: Current response link.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      first:
                        description: Link to the first page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      last:
                        description: Link to the previous page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      next:
                        description: Link to the next page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                    required:
                      - self
                      - first
                      - last
              examples:
                Example:
                  value:
                    data:
                      - type: buy_order
                        id: '15'
                        attributes:
                          order_id: 2353
                          type: SERVICE
                          code: 223
                          supplier_id: 879
                          state: CONFIRMED
                          entity_id: 12
                          observation: Service Buy order Observations
                          internal_buy_id: '192837465'
                          external_buy_id: FA 4455
                          related_to_type: FAILURE
                          related_to_id: 682007
                          total_price: 30.36
                          vat_total: '4.37'
                          discount_total: '0'
                          base_total: '25.98'
                          delivery_address: Address
                          created_by: 4582
                          completed_at: '2022-11-16 12:05:55'
                          completed_by: 4582
                          date_created: '2022-11-15 18:22:18'
                          date_updated: '2022-11-16 12:08:28'
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '403':
          description: Forbidden. The action can not be fulfilled.
          content:
            application/json:
              schema:
                title: 403 Forbidden
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 403
                      message:
                        type: string
                        examples:
                          - Action unauthorized
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 403
                      message: Action unauthorized
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
    post:
      operationId: createBuyOrder
      tags:
        - Buy Orders
      summary: Create a Buy Order
      description: This endpoint allows you to create a Buy Order.
      requestBody:
        content:
          application/json:
            schema:
              description: Buy Order payload
              type: object
              properties:
                type:
                  description: Type of Buy Order.
                  type: string
                  enum:
                    - MATERIAL
                    - SERVICE
                delivery_address:
                  description: Delivery Address of the Buy Order.
                  type:
                    - string
                    - 'null'
                external_sale_id:
                  description: External ID of the Buy Order.
                  type:
                    - string
                    - 'null'
                internal_sale_id:
                  description: Internal ID of the Buy Order.
                  type:
                    - string
                    - 'null'
                observation:
                  description: Observations/notes of the Buy Order.
                  type:
                    - string
                    - 'null'
                related_to_id:
                  description: >-
                    ID of the object (failure or scheduled work) related to the Buy Order. Required with field
                    related_to_type.
                  type:
                    - integer
                    - 'null'
                related_to_type:
                  description: Type of object related to the Buy Order. Required with field related_to_id.
                  type:
                    - string
                    - 'null'
                  enum:
                    - FAILURE
                    - SCHEDULED_WORK
                state:
                  description: State of the Buy Order.
                  type: string
                  enum:
                    - SAVED_AS_DRAFT
                    - CREATED
                    - RECEIVED_PARTIALLY
                    - RECEIVED
                    - CONFIRMED
                  default: SAVED_AS_DRAFT
                supplier_id:
                  description: >-
                    ID of the supplier associated with the Buy Order. Required for type 'SERVICE' unless the state is
                    'SAVED_AS_DRAFT'.
                  type:
                    - integer
                    - 'null'
                warehouse_id:
                  description: >-
                    ID of the Warehouse associated to the Buy Order. Required for type 'MATERIAL' unless the state is
                    'SAVED_AS_DRAFT'.
                  type: integer
              required:
                - type
                - state
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: Buy Order
                    description: Buy Order model structure details
                    type: object
                    properties:
                      id:
                        description: ID of the Buy Order.
                        type: string
                        readOnly: true
                      type:
                        description: Model type
                        type: string
                        enum:
                          - buy_order
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          entity_id:
                            type: integer
                            readOnly: true
                          type:
                            description: Type of Buy Order.
                            type: string
                            enum:
                              - MATERIAL
                              - SERVICE
                            readOnly: true
                          base_total:
                            description: The total base price of the Buy Order (including discount).
                            type:
                              - string
                              - 'null'
                            readOnly: true
                          code:
                            description: Code of the Buy Order.
                            type: string
                            readOnly: true
                          completed_at:
                            allOf:
                              - type:
                                  - string
                                  - 'null'
                                pattern: >-
                                  ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                  ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                examples:
                                  - '2021-07-21 18:38:00'
                              - description: Date Buy Order is Received (state transition to 'RECEIVED').
                                readOnly: true
                                examples:
                                  - '2021-07-22 18:38:00'
                          completed_by:
                            description: ID of the user who Received the Buy Order (state transition to 'RECEIVED').
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          created_by:
                            description: ID of the user who created the Buy Order
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          date_created:
                            allOf:
                              - type:
                                  - string
                                  - 'null'
                                pattern: >-
                                  ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                  ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                examples:
                                  - '2021-07-21 18:38:00'
                              - description: Date Buy Order is Created.
                                readOnly: true
                          date_updated:
                            description: Date Buy Order was last updated.
                            type: string
                            readOnly: true
                            examples:
                              - '2021-07-21 18:38:00'
                          delivery_address:
                            description: Delivery Address of the Buy Order.
                            type:
                              - string
                              - 'null'
                          discount_total:
                            description: The total discount of the Buy Order.
                            type:
                              - string
                              - 'null'
                            readOnly: true
                          external_buy_id:
                            description: External ID of the Buy Order.
                            type:
                              - string
                              - 'null'
                          internal_buy_id:
                            description: Internal ID of the Buy Order.
                            type:
                              - string
                              - 'null'
                          observation:
                            description: Observations or notes of the Buy Order.
                            type:
                              - string
                              - 'null'
                          order_id:
                            description: ID of the Buy Order.
                            type: integer
                            readOnly: true
                          processed_at:
                            allOf:
                              - type:
                                  - string
                                  - 'null'
                                pattern: >-
                                  ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                  ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                examples:
                                  - '2021-07-21 18:38:00'
                              - description: Date Buy Order is started (state transition to 'CREATED').
                                readOnly: true
                          processed_by:
                            description: ID of the user who started the Buy Order (state transition to 'CREATED').
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          related_to_id:
                            description: >-
                              ID of the object (failure or scheduled work) related to the Buy Order (required with field
                              related_to_type).
                            type:
                              - integer
                              - 'null'
                          related_to_type:
                            description: Type of object related to the Buy Order (required with field related_to_id).
                            type:
                              - string
                              - 'null'
                            enum:
                              - FAILURE
                              - SCHEDULED_WORK
                              - null
                              - ''
                          state:
                            description: State of the Buy Order.
                            type: string
                            enum:
                              - SAVED_AS_DRAFT
                              - CREATED
                              - RECEIVED_PARTIALLY
                              - RECEIVED
                              - CONFIRMED
                            default: SAVED_AS_DRAFT
                            examples:
                              - SAVED_AS_DRAFT
                          supplier_id:
                            description: >-
                              ID of the Supplier associated to the Buy Order. Required for type 'SERVICE' and state is
                              not 'SAVED_AS_DRAFT'.
                            type:
                              - integer
                              - 'null'
                          total_price:
                            description: The total price of the Sell Order (including VAT and discount)
                            type: number
                            readOnly: true
                          vat_total:
                            description: The total VAT of the Buy Order.
                            type:
                              - string
                              - 'null'
                            readOnly: true
                          warehouse_id:
                            description: >-
                              ID of the Warehouse associated to the Buy Order. Required for type 'MATERIAL' and state is
                              not 'SAVED_AS_DRAFT'.
                            type:
                              - integer
                              - 'null'
                      meta:
                        type: object
                        properties:
                          custom_fields:
                            type:
                              - object
                              - 'null'
                            additionalProperties:
                              oneOf:
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - SELECT
                                      examples:
                                        - SELECT
                                    value:
                                      description: The current values of the Custom Field in this resource
                                      type:
                                        - array
                                        - 'null'
                                      items:
                                        type: object
                                        properties:
                                          option_id:
                                            description: The ID of the selected option
                                            type: integer
                                            examples:
                                              - 123
                                          option_code:
                                            description: The code of the selected option
                                            type:
                                              - string
                                              - 'null'
                                            examples:
                                              - OP01
                                          value:
                                            description: The value of the selected option
                                            type: string
                                            examples:
                                              - My Option 1
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: The type settings for the Custom Field
                                          type: object
                                          properties:
                                            allow_multiple_selection:
                                              description: Indicates if the Custom Field supports selecting multiple values
                                              type: boolean
                                              examples:
                                                - true
                                            managed_by_integrations:
                                              description: Indicates if the Custom Field options are only managed by integrations
                                              type: boolean
                                              examples:
                                                - true
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - TEXT
                                      examples:
                                        - TEXT
                                    value:
                                      description: The current value of the Custom Field in this resource
                                      type:
                                        - string
                                        - 'null'
                                      examples:
                                        - abc
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: >-
                                            The type settings for the Custom Field (Empty for Custom Fields of type
                                            TEXT)
                                          type: object
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - BOOLEAN
                                      examples:
                                        - BOOLEAN
                                    value:
                                      description: The current value of the Custom Field in this resource
                                      type:
                                        - boolean
                                        - 'null'
                                      examples:
                                        - true
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: >-
                                            The type settings for the Custom Field (There are none for the Custom Field
                                            Boolean type)
                                          type: object
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - RELATIONSHIP
                                      examples:
                                        - RELATIONSHIP
                                    value:
                                      description: The current values of the Custom Field in this resource
                                      type:
                                        - array
                                        - 'null'
                                      items:
                                        type: object
                                        properties:
                                          related_to_type:
                                            description: The type of object that is selected as the Custom Field Values
                                            type: string
                                            enum:
                                              - CLIENT
                                              - CONTACT
                                            examples:
                                              - CLIENT
                                          related_to_id:
                                            description: The ID of object that is selected as the Custom Field Value
                                            type: integer
                                            examples:
                                              - 123
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: The type settings for the Custom Field
                                          type: object
                                          properties:
                                            allow_multiple_selection:
                                              description: Indicates if the Custom Field allows multiple selection
                                              type: boolean
                                              examples:
                                                - false
                                            relationship_object:
                                              description: The type of object that is selected as the Custom Field Values
                                              type: string
                                              enum:
                                                - CLIENT
                                                - CONTACT
                                              examples:
                                                - CLIENT
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - DATETIME
                                      examples:
                                        - DATETIME
                                    value:
                                      description: The current value of the Custom Field in this resource
                                      type:
                                        - string
                                        - 'null'
                                      format: date-time
                                      examples:
                                        - '2025-12-12 12:39:00'
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: The type settings for the Custom Field
                                          type: object
                                          properties:
                                            allow_past_dates:
                                              description: Indicates if this Custom Field support past dates
                                              type: boolean
                                              examples:
                                                - false
                                            allow_future_dates:
                                              description: Indicates if this Custom Field support future dates
                                              type: boolean
                                              examples:
                                                - true
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - NUMBER
                                      examples:
                                        - NUMBER
                                    value:
                                      description: The current value of the Custom Field in this resource
                                      type:
                                        - integer
                                        - 'null'
                                      examples:
                                        - 12
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: The type settings for the Custom Field
                                          type: object
                                          properties:
                                            min:
                                              description: Indicates the minimum value for the Custom Field
                                              type:
                                                - integer
                                                - 'null'
                                              examples:
                                                - 1
                                            max:
                                              description: Indicates the maximum value for the Custom Field
                                              type:
                                                - integer
                                                - 'null'
                                              examples:
                                                - 3
                              discriminator:
                                propertyName: field_type
                  meta:
                    title: Meta
                    description: Meta model structure details
                    type: object
                    properties:
                      cost_centers:
                        type: array
                        items:
                          type: string
                        examples:
                          - - Cost center
                            - Cost center 2
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '403':
          description: Forbidden. The action can not be fulfilled.
          content:
            application/json:
              schema:
                title: 403 Forbidden
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 403
                      message:
                        type: string
                        examples:
                          - Action unauthorized
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 403
                      message: Action unauthorized
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /sales/buy-orders/{buy-order-id}:
    get:
      operationId: getBuyOrder
      tags:
        - Buy Orders
      summary: Get a Buy Order
      description: This endpoint allows you to get a specific Buy Order.
      parameters:
        - name: buy-order-id
          in: path
          description: The Buy Order ID
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: Buy Order
                    description: Buy Order model structure details
                    type: object
                    properties:
                      id:
                        description: ID of the Buy Order.
                        type: string
                        readOnly: true
                      type:
                        description: Model type
                        type: string
                        enum:
                          - buy_order
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          entity_id:
                            type: integer
                            readOnly: true
                          type:
                            description: Type of Buy Order.
                            type: string
                            enum:
                              - MATERIAL
                              - SERVICE
                            readOnly: true
                          base_total:
                            description: The total base price of the Buy Order (including discount).
                            type:
                              - string
                              - 'null'
                            readOnly: true
                          code:
                            description: Code of the Buy Order.
                            type: string
                            readOnly: true
                          completed_at:
                            allOf:
                              - type:
                                  - string
                                  - 'null'
                                pattern: >-
                                  ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                  ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                examples:
                                  - '2021-07-21 18:38:00'
                              - description: Date Buy Order is Received (state transition to 'RECEIVED').
                                readOnly: true
                                examples:
                                  - '2021-07-22 18:38:00'
                          completed_by:
                            description: ID of the user who Received the Buy Order (state transition to 'RECEIVED').
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          created_by:
                            description: ID of the user who created the Buy Order
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          date_created:
                            allOf:
                              - type:
                                  - string
                                  - 'null'
                                pattern: >-
                                  ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                  ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                examples:
                                  - '2021-07-21 18:38:00'
                              - description: Date Buy Order is Created.
                                readOnly: true
                          date_updated:
                            description: Date Buy Order was last updated.
                            type: string
                            readOnly: true
                            examples:
                              - '2021-07-21 18:38:00'
                          delivery_address:
                            description: Delivery Address of the Buy Order.
                            type:
                              - string
                              - 'null'
                          discount_total:
                            description: The total discount of the Buy Order.
                            type:
                              - string
                              - 'null'
                            readOnly: true
                          external_buy_id:
                            description: External ID of the Buy Order.
                            type:
                              - string
                              - 'null'
                          internal_buy_id:
                            description: Internal ID of the Buy Order.
                            type:
                              - string
                              - 'null'
                          observation:
                            description: Observations or notes of the Buy Order.
                            type:
                              - string
                              - 'null'
                          order_id:
                            description: ID of the Buy Order.
                            type: integer
                            readOnly: true
                          processed_at:
                            allOf:
                              - type:
                                  - string
                                  - 'null'
                                pattern: >-
                                  ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                  ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                examples:
                                  - '2021-07-21 18:38:00'
                              - description: Date Buy Order is started (state transition to 'CREATED').
                                readOnly: true
                          processed_by:
                            description: ID of the user who started the Buy Order (state transition to 'CREATED').
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          related_to_id:
                            description: >-
                              ID of the object (failure or scheduled work) related to the Buy Order (required with field
                              related_to_type).
                            type:
                              - integer
                              - 'null'
                          related_to_type:
                            description: Type of object related to the Buy Order (required with field related_to_id).
                            type:
                              - string
                              - 'null'
                            enum:
                              - FAILURE
                              - SCHEDULED_WORK
                              - null
                              - ''
                          state:
                            description: State of the Buy Order.
                            type: string
                            enum:
                              - SAVED_AS_DRAFT
                              - CREATED
                              - RECEIVED_PARTIALLY
                              - RECEIVED
                              - CONFIRMED
                            default: SAVED_AS_DRAFT
                            examples:
                              - SAVED_AS_DRAFT
                          supplier_id:
                            description: >-
                              ID of the Supplier associated to the Buy Order. Required for type 'SERVICE' and state is
                              not 'SAVED_AS_DRAFT'.
                            type:
                              - integer
                              - 'null'
                          total_price:
                            description: The total price of the Sell Order (including VAT and discount)
                            type: number
                            readOnly: true
                          vat_total:
                            description: The total VAT of the Buy Order.
                            type:
                              - string
                              - 'null'
                            readOnly: true
                          warehouse_id:
                            description: >-
                              ID of the Warehouse associated to the Buy Order. Required for type 'MATERIAL' and state is
                              not 'SAVED_AS_DRAFT'.
                            type:
                              - integer
                              - 'null'
                      meta:
                        type: object
                        properties:
                          custom_fields:
                            type:
                              - object
                              - 'null'
                            additionalProperties:
                              oneOf:
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - SELECT
                                      examples:
                                        - SELECT
                                    value:
                                      description: The current values of the Custom Field in this resource
                                      type:
                                        - array
                                        - 'null'
                                      items:
                                        type: object
                                        properties:
                                          option_id:
                                            description: The ID of the selected option
                                            type: integer
                                            examples:
                                              - 123
                                          option_code:
                                            description: The code of the selected option
                                            type:
                                              - string
                                              - 'null'
                                            examples:
                                              - OP01
                                          value:
                                            description: The value of the selected option
                                            type: string
                                            examples:
                                              - My Option 1
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: The type settings for the Custom Field
                                          type: object
                                          properties:
                                            allow_multiple_selection:
                                              description: Indicates if the Custom Field supports selecting multiple values
                                              type: boolean
                                              examples:
                                                - true
                                            managed_by_integrations:
                                              description: Indicates if the Custom Field options are only managed by integrations
                                              type: boolean
                                              examples:
                                                - true
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - TEXT
                                      examples:
                                        - TEXT
                                    value:
                                      description: The current value of the Custom Field in this resource
                                      type:
                                        - string
                                        - 'null'
                                      examples:
                                        - abc
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: >-
                                            The type settings for the Custom Field (Empty for Custom Fields of type
                                            TEXT)
                                          type: object
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - BOOLEAN
                                      examples:
                                        - BOOLEAN
                                    value:
                                      description: The current value of the Custom Field in this resource
                                      type:
                                        - boolean
                                        - 'null'
                                      examples:
                                        - true
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: >-
                                            The type settings for the Custom Field (There are none for the Custom Field
                                            Boolean type)
                                          type: object
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - RELATIONSHIP
                                      examples:
                                        - RELATIONSHIP
                                    value:
                                      description: The current values of the Custom Field in this resource
                                      type:
                                        - array
                                        - 'null'
                                      items:
                                        type: object
                                        properties:
                                          related_to_type:
                                            description: The type of object that is selected as the Custom Field Values
                                            type: string
                                            enum:
                                              - CLIENT
                                              - CONTACT
                                            examples:
                                              - CLIENT
                                          related_to_id:
                                            description: The ID of object that is selected as the Custom Field Value
                                            type: integer
                                            examples:
                                              - 123
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: The type settings for the Custom Field
                                          type: object
                                          properties:
                                            allow_multiple_selection:
                                              description: Indicates if the Custom Field allows multiple selection
                                              type: boolean
                                              examples:
                                                - false
                                            relationship_object:
                                              description: The type of object that is selected as the Custom Field Values
                                              type: string
                                              enum:
                                                - CLIENT
                                                - CONTACT
                                              examples:
                                                - CLIENT
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - DATETIME
                                      examples:
                                        - DATETIME
                                    value:
                                      description: The current value of the Custom Field in this resource
                                      type:
                                        - string
                                        - 'null'
                                      format: date-time
                                      examples:
                                        - '2025-12-12 12:39:00'
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: The type settings for the Custom Field
                                          type: object
                                          properties:
                                            allow_past_dates:
                                              description: Indicates if this Custom Field support past dates
                                              type: boolean
                                              examples:
                                                - false
                                            allow_future_dates:
                                              description: Indicates if this Custom Field support future dates
                                              type: boolean
                                              examples:
                                                - true
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - NUMBER
                                      examples:
                                        - NUMBER
                                    value:
                                      description: The current value of the Custom Field in this resource
                                      type:
                                        - integer
                                        - 'null'
                                      examples:
                                        - 12
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: The type settings for the Custom Field
                                          type: object
                                          properties:
                                            min:
                                              description: Indicates the minimum value for the Custom Field
                                              type:
                                                - integer
                                                - 'null'
                                              examples:
                                                - 1
                                            max:
                                              description: Indicates the maximum value for the Custom Field
                                              type:
                                                - integer
                                                - 'null'
                                              examples:
                                                - 3
                              discriminator:
                                propertyName: field_type
                  meta:
                    title: Meta
                    description: Meta model structure details
                    type: object
                    properties:
                      cost_centers:
                        type: array
                        items:
                          type: string
                        examples:
                          - - Cost center
                            - Cost center 2
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '403':
          description: Forbidden. The action can not be fulfilled.
          content:
            application/json:
              schema:
                title: 403 Forbidden
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 403
                      message:
                        type: string
                        examples:
                          - Action unauthorized
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 403
                      message: Action unauthorized
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
    delete:
      operationId: deleteBuyOrder
      tags:
        - Buy Orders
      summary: Delete a Buy Order
      description: This endpoint allows you to delete a specific Buy Order.
      parameters:
        - name: buy-order-id
          in: path
          description: The Buy Order ID
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items: {}
                  status:
                    type: string
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '403':
          description: Forbidden. The action can not be fulfilled.
          content:
            application/json:
              schema:
                title: 403 Forbidden
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 403
                      message:
                        type: string
                        examples:
                          - Action unauthorized
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 403
                      message: Action unauthorized
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
    patch:
      operationId: updateBuyOrder
      tags:
        - Buy Orders
      summary: Update a Buy Order
      description: This endpoint allows you to update a Buy Order.
      parameters:
        - name: buy-order-id
          in: path
          description: The Buy Order ID
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              description: Buy Order update payload
              type: object
              properties:
                supplier_id:
                  description: ID of the supplier associated with the Buy Order. Nullable only if state is 'SAVED_AS_DRAFT'.
                  type:
                    - integer
                    - 'null'
                warehouse_id:
                  description: ID of the Warehouse associated to the Buy Order.
                  type: integer
                description:
                  description: Observations/notes of the Buy Order.
                  type:
                    - string
                    - 'null'
                internal_sale_id:
                  description: Internal ID of the Buy Order.
                  type:
                    - string
                    - 'null'
                external_sale_id:
                  description: External ID of the Buy Order.
                  type:
                    - string
                    - 'null'
                related_to_type:
                  description: Type of object related to the Buy Order. Required with field related_to_id.
                  type:
                    - string
                    - 'null'
                  enum:
                    - FAILURE
                    - SCHEDULED_WORK
                    - null
                related_to_id:
                  description: >-
                    ID of the object (failure or scheduled work) related to the Buy Order. Required with field
                    related_to_type.
                  type:
                    - integer
                    - 'null'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: Buy Order
                    description: Buy Order model structure details
                    type: object
                    properties:
                      id:
                        description: ID of the Buy Order.
                        type: string
                        readOnly: true
                      type:
                        description: Model type
                        type: string
                        enum:
                          - buy_order
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          entity_id:
                            type: integer
                            readOnly: true
                          type:
                            description: Type of Buy Order.
                            type: string
                            enum:
                              - MATERIAL
                              - SERVICE
                            readOnly: true
                          base_total:
                            description: The total base price of the Buy Order (including discount).
                            type:
                              - string
                              - 'null'
                            readOnly: true
                          code:
                            description: Code of the Buy Order.
                            type: string
                            readOnly: true
                          completed_at:
                            allOf:
                              - type:
                                  - string
                                  - 'null'
                                pattern: >-
                                  ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                  ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                examples:
                                  - '2021-07-21 18:38:00'
                              - description: Date Buy Order is Received (state transition to 'RECEIVED').
                                readOnly: true
                                examples:
                                  - '2021-07-22 18:38:00'
                          completed_by:
                            description: ID of the user who Received the Buy Order (state transition to 'RECEIVED').
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          created_by:
                            description: ID of the user who created the Buy Order
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          date_created:
                            allOf:
                              - type:
                                  - string
                                  - 'null'
                                pattern: >-
                                  ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                  ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                examples:
                                  - '2021-07-21 18:38:00'
                              - description: Date Buy Order is Created.
                                readOnly: true
                          date_updated:
                            description: Date Buy Order was last updated.
                            type: string
                            readOnly: true
                            examples:
                              - '2021-07-21 18:38:00'
                          delivery_address:
                            description: Delivery Address of the Buy Order.
                            type:
                              - string
                              - 'null'
                          discount_total:
                            description: The total discount of the Buy Order.
                            type:
                              - string
                              - 'null'
                            readOnly: true
                          external_buy_id:
                            description: External ID of the Buy Order.
                            type:
                              - string
                              - 'null'
                          internal_buy_id:
                            description: Internal ID of the Buy Order.
                            type:
                              - string
                              - 'null'
                          observation:
                            description: Observations or notes of the Buy Order.
                            type:
                              - string
                              - 'null'
                          order_id:
                            description: ID of the Buy Order.
                            type: integer
                            readOnly: true
                          processed_at:
                            allOf:
                              - type:
                                  - string
                                  - 'null'
                                pattern: >-
                                  ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                  ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                examples:
                                  - '2021-07-21 18:38:00'
                              - description: Date Buy Order is started (state transition to 'CREATED').
                                readOnly: true
                          processed_by:
                            description: ID of the user who started the Buy Order (state transition to 'CREATED').
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          related_to_id:
                            description: >-
                              ID of the object (failure or scheduled work) related to the Buy Order (required with field
                              related_to_type).
                            type:
                              - integer
                              - 'null'
                          related_to_type:
                            description: Type of object related to the Buy Order (required with field related_to_id).
                            type:
                              - string
                              - 'null'
                            enum:
                              - FAILURE
                              - SCHEDULED_WORK
                              - null
                              - ''
                          state:
                            description: State of the Buy Order.
                            type: string
                            enum:
                              - SAVED_AS_DRAFT
                              - CREATED
                              - RECEIVED_PARTIALLY
                              - RECEIVED
                              - CONFIRMED
                            default: SAVED_AS_DRAFT
                            examples:
                              - SAVED_AS_DRAFT
                          supplier_id:
                            description: >-
                              ID of the Supplier associated to the Buy Order. Required for type 'SERVICE' and state is
                              not 'SAVED_AS_DRAFT'.
                            type:
                              - integer
                              - 'null'
                          total_price:
                            description: The total price of the Sell Order (including VAT and discount)
                            type: number
                            readOnly: true
                          vat_total:
                            description: The total VAT of the Buy Order.
                            type:
                              - string
                              - 'null'
                            readOnly: true
                          warehouse_id:
                            description: >-
                              ID of the Warehouse associated to the Buy Order. Required for type 'MATERIAL' and state is
                              not 'SAVED_AS_DRAFT'.
                            type:
                              - integer
                              - 'null'
                      meta:
                        type: object
                        properties:
                          custom_fields:
                            type:
                              - object
                              - 'null'
                            additionalProperties:
                              oneOf:
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - SELECT
                                      examples:
                                        - SELECT
                                    value:
                                      description: The current values of the Custom Field in this resource
                                      type:
                                        - array
                                        - 'null'
                                      items:
                                        type: object
                                        properties:
                                          option_id:
                                            description: The ID of the selected option
                                            type: integer
                                            examples:
                                              - 123
                                          option_code:
                                            description: The code of the selected option
                                            type:
                                              - string
                                              - 'null'
                                            examples:
                                              - OP01
                                          value:
                                            description: The value of the selected option
                                            type: string
                                            examples:
                                              - My Option 1
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: The type settings for the Custom Field
                                          type: object
                                          properties:
                                            allow_multiple_selection:
                                              description: Indicates if the Custom Field supports selecting multiple values
                                              type: boolean
                                              examples:
                                                - true
                                            managed_by_integrations:
                                              description: Indicates if the Custom Field options are only managed by integrations
                                              type: boolean
                                              examples:
                                                - true
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - TEXT
                                      examples:
                                        - TEXT
                                    value:
                                      description: The current value of the Custom Field in this resource
                                      type:
                                        - string
                                        - 'null'
                                      examples:
                                        - abc
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: >-
                                            The type settings for the Custom Field (Empty for Custom Fields of type
                                            TEXT)
                                          type: object
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - BOOLEAN
                                      examples:
                                        - BOOLEAN
                                    value:
                                      description: The current value of the Custom Field in this resource
                                      type:
                                        - boolean
                                        - 'null'
                                      examples:
                                        - true
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: >-
                                            The type settings for the Custom Field (There are none for the Custom Field
                                            Boolean type)
                                          type: object
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - RELATIONSHIP
                                      examples:
                                        - RELATIONSHIP
                                    value:
                                      description: The current values of the Custom Field in this resource
                                      type:
                                        - array
                                        - 'null'
                                      items:
                                        type: object
                                        properties:
                                          related_to_type:
                                            description: The type of object that is selected as the Custom Field Values
                                            type: string
                                            enum:
                                              - CLIENT
                                              - CONTACT
                                            examples:
                                              - CLIENT
                                          related_to_id:
                                            description: The ID of object that is selected as the Custom Field Value
                                            type: integer
                                            examples:
                                              - 123
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: The type settings for the Custom Field
                                          type: object
                                          properties:
                                            allow_multiple_selection:
                                              description: Indicates if the Custom Field allows multiple selection
                                              type: boolean
                                              examples:
                                                - false
                                            relationship_object:
                                              description: The type of object that is selected as the Custom Field Values
                                              type: string
                                              enum:
                                                - CLIENT
                                                - CONTACT
                                              examples:
                                                - CLIENT
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - DATETIME
                                      examples:
                                        - DATETIME
                                    value:
                                      description: The current value of the Custom Field in this resource
                                      type:
                                        - string
                                        - 'null'
                                      format: date-time
                                      examples:
                                        - '2025-12-12 12:39:00'
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: The type settings for the Custom Field
                                          type: object
                                          properties:
                                            allow_past_dates:
                                              description: Indicates if this Custom Field support past dates
                                              type: boolean
                                              examples:
                                                - false
                                            allow_future_dates:
                                              description: Indicates if this Custom Field support future dates
                                              type: boolean
                                              examples:
                                                - true
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - NUMBER
                                      examples:
                                        - NUMBER
                                    value:
                                      description: The current value of the Custom Field in this resource
                                      type:
                                        - integer
                                        - 'null'
                                      examples:
                                        - 12
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: The type settings for the Custom Field
                                          type: object
                                          properties:
                                            min:
                                              description: Indicates the minimum value for the Custom Field
                                              type:
                                                - integer
                                                - 'null'
                                              examples:
                                                - 1
                                            max:
                                              description: Indicates the maximum value for the Custom Field
                                              type:
                                                - integer
                                                - 'null'
                                              examples:
                                                - 3
                              discriminator:
                                propertyName: field_type
                  meta:
                    title: Meta
                    description: Meta model structure details
                    type: object
                    properties:
                      cost_centers:
                        type: array
                        items:
                          type: string
                        examples:
                          - - Cost center
                            - Cost center 2
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '403':
          description: Forbidden. The action can not be fulfilled.
          content:
            application/json:
              schema:
                title: 403 Forbidden
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 403
                      message:
                        type: string
                        examples:
                          - Action unauthorized
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 403
                      message: Action unauthorized
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /sales/buy-orders/{buy-order-id}/lines:
    get:
      operationId: getBuyOrderLines
      tags:
        - Buy Orders
      summary: List all Buy Order Lines
      description: This endpoint allows you to list all Buy Orders Lines for a specific Buy Order.
      parameters:
        - name: buy-order-id
          in: path
          description: The Buy Order ID
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      title: Buy Order Line
                      description: Buy Order Line model structure details
                      type: object
                      properties:
                        id:
                          description: ID of the Buy Order Line.
                          type: string
                          readOnly: true
                        type:
                          description: Model type. Model varies with the type of Buy Order.
                          type: string
                          enum:
                            - buy_order_service
                            - buy_order_material
                          readOnly: true
                        attributes:
                          type: object
                          properties:
                            order_service_id:
                              description: ID of the Buy Order Line. Only present if the type of Buy Order is 'SERVICE'.
                              type: integer
                              readOnly: true
                            order_material_id:
                              description: ID of the Buy Order Line. Only present if the type of Buy Order is 'MATERIAL'.
                              type: integer
                              readOnly: true
                            order_id:
                              description: ID of the associated Buy Order.
                              type: integer
                              readOnly: true
                            description:
                              description: >-
                                Description of the item of Buy Order Line. Required if buy order type is 'SERVICE'. If
                                the type of buy order is 'MATERIAL', corresponds to the Material name.
                              type:
                                - string
                                - 'null'
                            material_id:
                              description: >-
                                ID of the Material item in the Buy Order Line. Only present if the type of Buy Order is
                                'MATERIAL'.
                              type:
                                - integer
                                - 'null'
                            price:
                              description: ID of the Other Cost in the Buy Order Line.
                              type:
                                - string
                                - 'null'
                              minimum: 0
                            quantity:
                              description: Quantity of the item in the Buy Order Line.
                              type: string
                              minimum: 0
                            quantity_received:
                              description: >-
                                Received quantity of the item in the Buy Order Line. Only present if the type of Buy
                                Order is 'MATERIAL'.
                              type:
                                - string
                                - 'null'
                            observation:
                              description: Observation or notes of the Buy Order Line.
                              type:
                                - string
                                - 'null'
                            vat:
                              description: VAT applied to the item in the Buy Order Line.
                              type: string
                              minimum: 0
                            discount:
                              description: Discount percentage applied to the item in the Buy Order Line.
                              type: string
                              minimum: 0
                              maximum: 100
                            unit:
                              description: >-
                                Unit of the item in the Buy Order Line. Only present if the type of Buy Order is
                                'MATERIAL'.
                              type:
                                - string
                                - 'null'
                            vat_total:
                              description: Total VAT applied to the Buy Order Line.
                              type: number
                              readOnly: true
                            discount_total:
                              description: Total discount the Buy Order Line.
                              type: number
                              readOnly: true
                            base_total:
                              description: Total base price the Buy Order Line.
                              type: number
                              readOnly: true
                            total:
                              description: Total price the Buy Order Line.
                              type: number
                              readOnly: true
                            cost_center_id:
                              description: ID of the associated Cost Center.
                              type:
                                - integer
                                - 'null'
                            estimated_at:
                              description: >-
                                Date when material is estimated to arrive. Only present if the type of Buy Order is
                                'MATERIAL'.
                              type:
                                - string
                                - 'null'
                              pattern: >-
                                ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])+(.*)$
                              examples:
                                - '2021-07-21T18:38:00'
                      required:
                        - id
                        - type
                        - attributes
                  included:
                    description: List of relationships to be included
                    type: array
                    items:
                      type: object
                    uniqueItems: true
                  meta:
                    title: Meta
                    description: Meta model structure details
                    type: object
                    properties:
                      pagination:
                        type: object
                        properties:
                          total:
                            description: Total items.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          count:
                            description: Total items returned for the current page.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          per_page:
                            description: Maximum number of records per page.
                            type: integer
                            minimum: 1
                            default: 200
                            examples:
                              - 1
                          current_page:
                            description: Number of the current page.
                            type: integer
                            minimum: 1
                            default: 1
                          total_pages:
                            description: Number of the total pages.
                            type: integer
                            minimum: 1
                            default: 1
                        required:
                          - total
                          - count
                          - per_page
                          - current_page
                          - total_pages
                  links:
                    title: Response Links on listing operations
                    description: >-
                      Requests that return multiple items include a `links` attribute, with links related to request's
                      context.
                    type: object
                    properties:
                      self:
                        description: Current response link.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      first:
                        description: Link to the first page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      last:
                        description: Link to the previous page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      next:
                        description: Link to the next page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                    required:
                      - self
                      - first
                      - last
              examples:
                Example:
                  value:
                    data:
                      - type: buy_order_service
                        id: '22'
                        attributes:
                          order_service_id: 620
                          order_id: 2353
                          description: General Maintenance Services
                          price: '1000'
                          quantity: '1'
                          vat: '23.000'
                          discount: '0.000'
                          vat_total: 230
                          discount_total: 0
                          base_total: 1000
                          total: 1000
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '403':
          description: Forbidden. The action can not be fulfilled.
          content:
            application/json:
              schema:
                title: 403 Forbidden
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 403
                      message:
                        type: string
                        examples:
                          - Action unauthorized
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 403
                      message: Action unauthorized
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
    post:
      operationId: createBuyOrderLine
      tags:
        - Buy Orders
      summary: Create a Buy Order Line
      description: This endpoint allows you to create a Buy Order Line for a specific Buy Order.
      parameters:
        - name: buy-order-id
          in: path
          description: The Buy Order ID
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              description: Buy Order Line payload
              type: object
              properties:
                description:
                  description: Description of the item of Buy Order Line. Required if buy order type is 'SERVICE'.
                  type:
                    - string
                    - 'null'
                material_id:
                  description: ID of the Material item in the Buy Order Line. Only present if the type of Buy Order is 'MATERIAL'.
                  type:
                    - integer
                    - 'null'
                price:
                  description: ID of the Other Cost in the Buy Order Line.
                  type:
                    - string
                    - 'null'
                  minimum: 0
                quantity:
                  description: Quantity of the item in the Buy Order Line.
                  type: string
                  minimum: 0
                observation:
                  description: Observation or notes of the Buy Order Line.
                  type:
                    - string
                    - 'null'
                vat:
                  description: VAT applied to the item in the Buy Order Line.
                  type: string
                  minimum: 0
                discount:
                  description: Discount percentage applied to the item in the Buy Order Line.
                  type: string
                  minimum: 0
                  maximum: 100
                unit:
                  description: Unit of the item in the Buy Order Line. Only present if the type of Buy Order is 'MATERIAL'.
                  type:
                    - string
                    - 'null'
                cost_center_id:
                  description: ID of the Cost Center item in the Buy Order Line.
                  type:
                    - integer
                    - 'null'
                estimated_at:
                  description: Date when material is estimated to arrive. Only present if the type of Buy Order is 'MATERIAL'.
                  type: string
                  pattern: ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])+(.*)$
                  examples:
                    - '2024-07-21T18:38:00'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: Buy Order Line
                    description: Buy Order Line model structure details
                    type: object
                    properties:
                      id:
                        description: ID of the Buy Order Line.
                        type: string
                        readOnly: true
                      type:
                        description: Model type. Model varies with the type of Buy Order.
                        type: string
                        enum:
                          - buy_order_service
                          - buy_order_material
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          order_service_id:
                            description: ID of the Buy Order Line. Only present if the type of Buy Order is 'SERVICE'.
                            type: integer
                            readOnly: true
                          order_material_id:
                            description: ID of the Buy Order Line. Only present if the type of Buy Order is 'MATERIAL'.
                            type: integer
                            readOnly: true
                          order_id:
                            description: ID of the associated Buy Order.
                            type: integer
                            readOnly: true
                          description:
                            description: >-
                              Description of the item of Buy Order Line. Required if buy order type is 'SERVICE'. If the
                              type of buy order is 'MATERIAL', corresponds to the Material name.
                            type:
                              - string
                              - 'null'
                          material_id:
                            description: >-
                              ID of the Material item in the Buy Order Line. Only present if the type of Buy Order is
                              'MATERIAL'.
                            type:
                              - integer
                              - 'null'
                          price:
                            description: ID of the Other Cost in the Buy Order Line.
                            type:
                              - string
                              - 'null'
                            minimum: 0
                          quantity:
                            description: Quantity of the item in the Buy Order Line.
                            type: string
                            minimum: 0
                          quantity_received:
                            description: >-
                              Received quantity of the item in the Buy Order Line. Only present if the type of Buy Order
                              is 'MATERIAL'.
                            type:
                              - string
                              - 'null'
                          observation:
                            description: Observation or notes of the Buy Order Line.
                            type:
                              - string
                              - 'null'
                          vat:
                            description: VAT applied to the item in the Buy Order Line.
                            type: string
                            minimum: 0
                          discount:
                            description: Discount percentage applied to the item in the Buy Order Line.
                            type: string
                            minimum: 0
                            maximum: 100
                          unit:
                            description: >-
                              Unit of the item in the Buy Order Line. Only present if the type of Buy Order is
                              'MATERIAL'.
                            type:
                              - string
                              - 'null'
                          vat_total:
                            description: Total VAT applied to the Buy Order Line.
                            type: number
                            readOnly: true
                          discount_total:
                            description: Total discount the Buy Order Line.
                            type: number
                            readOnly: true
                          base_total:
                            description: Total base price the Buy Order Line.
                            type: number
                            readOnly: true
                          total:
                            description: Total price the Buy Order Line.
                            type: number
                            readOnly: true
                          cost_center_id:
                            description: ID of the associated Cost Center.
                            type:
                              - integer
                              - 'null'
                          estimated_at:
                            description: >-
                              Date when material is estimated to arrive. Only present if the type of Buy Order is
                              'MATERIAL'.
                            type:
                              - string
                              - 'null'
                            pattern: >-
                              ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])+(.*)$
                            examples:
                              - '2021-07-21T18:38:00'
                    required:
                      - id
                      - type
                      - attributes
              examples:
                Example:
                  value:
                    data:
                      type: buy_order_service
                      id: '22'
                      attributes:
                        order_service_id: 620
                        order_id: 2353
                        description: General Maintenance Services
                        price: '1000'
                        quantity: '1'
                        vat: '23.000'
                        discount: '0.000'
                        vat_total: 230
                        discount_total: 0
                        base_total: 1000
                        total: 1000
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '403':
          description: Forbidden. The action can not be fulfilled.
          content:
            application/json:
              schema:
                title: 403 Forbidden
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 403
                      message:
                        type: string
                        examples:
                          - Action unauthorized
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 403
                      message: Action unauthorized
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /sales/buy-orders/{buy-order-id}/lines/{buy-order-line-id}:
    patch:
      operationId: updateBuyOrderLine
      tags:
        - Buy Orders
      summary: Update a Buy Order Line
      description: This endpoint allows you to update a Buy Order Line for a specific Buy Order.
      parameters:
        - name: buy-order-id
          in: path
          description: The Buy Order ID
          required: true
          schema:
            type: string
        - name: buy-order-line-id
          in: path
          description: The Buy Order Line ID
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              description: Buy Order Line update payload
              type: object
              properties:
                description:
                  description: Description of the item of Buy Order Line. Only present if buy order type is 'SERVICE'.
                  type:
                    - string
                    - 'null'
                material_id:
                  description: ID of the Material item in the Buy Order Line. Only present if the type of Buy Order is 'MATERIAL'.
                  type:
                    - integer
                    - 'null'
                price:
                  description: ID of the Other Cost in the Buy Order Line.
                  type:
                    - string
                    - 'null'
                  minimum: 0
                quantity:
                  description: Quantity of the item in the Buy Order Line.
                  type: string
                  minimum: 0
                observation:
                  description: Observation or notes of the Buy Order Line.
                  type:
                    - string
                    - 'null'
                vat:
                  description: VAT applied to the item in the Buy Order Line.
                  type: string
                  minimum: 0
                discount:
                  description: Discount percentage applied to the item in the Buy Order Line.
                  type: string
                  minimum: 0
                  maximum: 100
                unit:
                  description: Unit of the item in the Buy Order Line. Only present if the type of Buy Order is 'MATERIAL'.
                  type:
                    - string
                    - 'null'
                cost_center_id:
                  description: ID of the cost center in the Buy Order Line.
                  type:
                    - integer
                    - 'null'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: Buy Order Line
                    description: Buy Order Line model structure details
                    type: object
                    properties:
                      id:
                        description: ID of the Buy Order Line.
                        type: string
                        readOnly: true
                      type:
                        description: Model type. Model varies with the type of Buy Order.
                        type: string
                        enum:
                          - buy_order_service
                          - buy_order_material
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          order_service_id:
                            description: ID of the Buy Order Line. Only present if the type of Buy Order is 'SERVICE'.
                            type: integer
                            readOnly: true
                          order_material_id:
                            description: ID of the Buy Order Line. Only present if the type of Buy Order is 'MATERIAL'.
                            type: integer
                            readOnly: true
                          order_id:
                            description: ID of the associated Buy Order.
                            type: integer
                            readOnly: true
                          description:
                            description: >-
                              Description of the item of Buy Order Line. Required if buy order type is 'SERVICE'. If the
                              type of buy order is 'MATERIAL', corresponds to the Material name.
                            type:
                              - string
                              - 'null'
                          material_id:
                            description: >-
                              ID of the Material item in the Buy Order Line. Only present if the type of Buy Order is
                              'MATERIAL'.
                            type:
                              - integer
                              - 'null'
                          price:
                            description: ID of the Other Cost in the Buy Order Line.
                            type:
                              - string
                              - 'null'
                            minimum: 0
                          quantity:
                            description: Quantity of the item in the Buy Order Line.
                            type: string
                            minimum: 0
                          quantity_received:
                            description: >-
                              Received quantity of the item in the Buy Order Line. Only present if the type of Buy Order
                              is 'MATERIAL'.
                            type:
                              - string
                              - 'null'
                          observation:
                            description: Observation or notes of the Buy Order Line.
                            type:
                              - string
                              - 'null'
                          vat:
                            description: VAT applied to the item in the Buy Order Line.
                            type: string
                            minimum: 0
                          discount:
                            description: Discount percentage applied to the item in the Buy Order Line.
                            type: string
                            minimum: 0
                            maximum: 100
                          unit:
                            description: >-
                              Unit of the item in the Buy Order Line. Only present if the type of Buy Order is
                              'MATERIAL'.
                            type:
                              - string
                              - 'null'
                          vat_total:
                            description: Total VAT applied to the Buy Order Line.
                            type: number
                            readOnly: true
                          discount_total:
                            description: Total discount the Buy Order Line.
                            type: number
                            readOnly: true
                          base_total:
                            description: Total base price the Buy Order Line.
                            type: number
                            readOnly: true
                          total:
                            description: Total price the Buy Order Line.
                            type: number
                            readOnly: true
                          cost_center_id:
                            description: ID of the associated Cost Center.
                            type:
                              - integer
                              - 'null'
                          estimated_at:
                            description: >-
                              Date when material is estimated to arrive. Only present if the type of Buy Order is
                              'MATERIAL'.
                            type:
                              - string
                              - 'null'
                            pattern: >-
                              ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])+(.*)$
                            examples:
                              - '2021-07-21T18:38:00'
                    required:
                      - id
                      - type
                      - attributes
              examples:
                Example:
                  value:
                    data:
                      type: buy_order_service
                      id: '22'
                      attributes:
                        order_service_id: 620
                        order_id: 2353
                        description: General Maintenance Services
                        price: '1000'
                        quantity: '1'
                        vat: '23.000'
                        discount: '0.000'
                        vat_total: 230
                        discount_total: 0
                        base_total: 1000
                        total: 1000
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '403':
          description: Forbidden. The action can not be fulfilled.
          content:
            application/json:
              schema:
                title: 403 Forbidden
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 403
                      message:
                        type: string
                        examples:
                          - Action unauthorized
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 403
                      message: Action unauthorized
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
    delete:
      operationId: deleteBuyOrderLine
      tags:
        - Buy Orders
      summary: Delete a Buy Order Line
      description: This endpoint allows you to delete a Buy Order Line for a specific Buy Order.
      parameters:
        - name: buy-order-id
          in: path
          description: The Buy Order ID
          required: true
          schema:
            type: string
        - name: buy-order-line-id
          in: path
          description: The Buy Order Line ID
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items: {}
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '403':
          description: Forbidden. The action can not be fulfilled.
          content:
            application/json:
              schema:
                title: 403 Forbidden
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 403
                      message:
                        type: string
                        examples:
                          - Action unauthorized
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 403
                      message: Action unauthorized
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /sales/quotes:
    get:
      operationId: getQuotes
      tags:
        - Quotes
      summary: List Quotes
      description: This endpoint allows you to list all Quotes.
      parameters: []
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      title: Quote
                      description: Quote model structure details
                      type: object
                      properties:
                        id:
                          description: ID of the Quote.
                          type: string
                          readOnly: true
                        type:
                          description: Model type
                          type: string
                          enum:
                            - quote
                          readOnly: true
                        attributes:
                          type: object
                          properties:
                            quote_id:
                              description: ID of the Quote.
                              type: integer
                              readOnly: true
                            quote_uuid:
                              description: UUID of the Quote.
                              type:
                                - string
                                - 'null'
                              format: uuid
                              readOnly: true
                            code:
                              description: Code of the Quote. Visible on Infraspeak platform.
                              type: integer
                              readOnly: true
                            client_id:
                              description: ID of the Client associated to the quote.
                              type:
                                - integer
                                - 'null'
                              readOnly: true
                            state:
                              description: State of the Quote.
                              type: string
                              enum:
                                - DRAFT
                                - READY
                                - ACCEPTED
                                - DECLINED
                                - CANCELLED
                                - CONVERTED_TO_SALE
                              default: DRAFT
                              examples:
                                - DRAFT
                            entity_id:
                              type: integer
                              readOnly: true
                            created_at:
                              allOf:
                                - type:
                                    - string
                                    - 'null'
                                  pattern: >-
                                    ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                    ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                  examples:
                                    - '2021-07-21 18:38:00'
                                - description: Creation date of the Quote
                                  readOnly: true
                            created_by:
                              description: ID of the operator that created the Quote.
                              type: integer
                              readOnly: true
                            started_at:
                              allOf:
                                - type:
                                    - string
                                    - 'null'
                                  pattern: >-
                                    ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                    ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                  examples:
                                    - '2021-07-21 18:38:00'
                                - description: Date when Quote has started.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                            started_by:
                              type:
                                - integer
                                - 'null'
                              readOnly: true
                            ready_at:
                              allOf:
                                - type:
                                    - string
                                    - 'null'
                                  pattern: >-
                                    ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                    ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                  examples:
                                    - '2021-07-21 18:38:00'
                                - description: Date Quote is marked as Awaiting.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                            ready_by_id:
                              description: ID of the user who marked the quote as Awaiting.
                              type:
                                - integer
                                - 'null'
                              readOnly: true
                            ready_by_type:
                              description: Type of user who marked the Quote as Awaiting.
                              type:
                                - string
                                - 'null'
                              enum:
                                - OPERATOR
                                - CONTACT
                                - null
                              default: OPERATOR
                            accepted_at:
                              allOf:
                                - type:
                                    - string
                                    - 'null'
                                  pattern: >-
                                    ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                    ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                  examples:
                                    - '2021-07-21 18:38:00'
                                - description: Date Quote is accepted.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                            accepted_by_id:
                              description: ID of the user who accepted the Quote.
                              type:
                                - integer
                                - 'null'
                              readOnly: true
                            accepted_by_type:
                              description: Type of user who accepted the Quote.
                              type:
                                - string
                                - 'null'
                              enum:
                                - OPERATOR
                                - CONTACT
                                - null
                              default: OPERATOR
                            declined_at:
                              allOf:
                                - type:
                                    - string
                                    - 'null'
                                  pattern: >-
                                    ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                    ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                  examples:
                                    - '2021-07-21 18:38:00'
                                - description: Date Quote was declined.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                            declined_by_id:
                              description: ID of the user who declined the quote.
                              type:
                                - integer
                                - 'null'
                              readOnly: true
                            declined_by_type:
                              description: Type of user who declined the Quote.
                              type:
                                - string
                                - 'null'
                              enum:
                                - OPERATOR
                                - CONTACT
                                - null
                              default: OPERATOR
                            cancelled_by:
                              description: ID of the user who cancelled the quote.
                              type:
                                - integer
                                - 'null'
                              readOnly: true
                            cancelled_at:
                              allOf:
                                - type:
                                    - string
                                    - 'null'
                                  pattern: >-
                                    ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                    ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                  examples:
                                    - '2021-07-21 18:38:00'
                                - description: Date Quote was cancelled.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                            last_sent_at:
                              allOf:
                                - type:
                                    - string
                                    - 'null'
                                  pattern: >-
                                    ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                    ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                  examples:
                                    - '2021-07-21 18:38:00'
                                - description: Date Quote was last sent.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                            last_sent_by:
                              type:
                                - integer
                                - 'null'
                              readOnly: true
                            last_share_at:
                              allOf:
                                - type:
                                    - string
                                    - 'null'
                                  pattern: >-
                                    ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                    ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                  examples:
                                    - '2021-07-21 18:38:00'
                                - description: Date Quote was last shared.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                            last_share_by:
                              type:
                                - integer
                                - 'null'
                              readOnly: true
                            converted_by:
                              type:
                                - integer
                                - 'null'
                              readOnly: true
                            converted_at:
                              allOf:
                                - type:
                                    - string
                                    - 'null'
                                  pattern: >-
                                    ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                    ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                  examples:
                                    - '2021-07-21 18:38:00'
                                - description: Date Quote was converted.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                            description:
                              description: Quote observations.
                              type:
                                - string
                                - 'null'
                            internal_quote_id:
                              description: Internal ID of the Quote.
                              type:
                                - string
                                - 'null'
                              readOnly: true
                              examples:
                                - FS-123
                            external_quote_id:
                              description: External ID of the Quote.
                              type:
                                - string
                                - 'null'
                              readOnly: true
                              examples:
                                - FS-123
                            related_to_type:
                              description: Type of object related to the quote.
                              type:
                                - string
                                - 'null'
                              enum:
                                - FAILURE
                                - SCHEDULED_WORK
                                - null
                              examples:
                                - FAILURE
                            related_to_id:
                              description: ID of the object (failure or scheduled work) related to the quote.
                              type:
                                - integer
                                - 'null'
                            base_total:
                              description: Total Base value of the Quote, without VAT and discount.
                              type:
                                - integer
                                - 'null'
                              readOnly: true
                            discount_total:
                              description: Total value of the discount applied to the Quote items.
                              type:
                                - integer
                                - 'null'
                              readOnly: true
                            vat_total:
                              description: Total value of the VAT applied to the Quote items.
                              type:
                                - integer
                                - 'null'
                              readOnly: true
                            total:
                              description: Total value of the Quote, considering the discount and VAT applied.
                              type: integer
                              readOnly: true
                            sell_order_id:
                              description: ID of the Sale associated to the Quote, after converted.
                              type:
                                - integer
                                - 'null'
                              readOnly: true
                            updated_at:
                              allOf:
                                - type:
                                    - string
                                    - 'null'
                                  pattern: >-
                                    ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                    ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                  examples:
                                    - '2021-07-21 18:38:00'
                                - description: Date Quote was updated.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                            deleted_at:
                              allOf:
                                - type:
                                    - string
                                    - 'null'
                                  pattern: >-
                                    ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                    ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                  examples:
                                    - '2021-07-21 18:38:00'
                                - description: Date Quote was deleted.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                            quote_request_id:
                              type:
                                - integer
                                - 'null'
                              readOnly: true
                            received_quote_request_id:
                              type:
                                - integer
                                - 'null'
                              readOnly: true
                            is_from_network:
                              type: boolean
                              readOnly: true
                            client_answer:
                              type: object
                              properties:
                                clientUserName:
                                  type: string
                                clientName:
                                  type: string
                                answer:
                                  type: string
                        meta:
                          type: object
                          properties:
                            custom_fields:
                              type:
                                - object
                                - 'null'
                              additionalProperties:
                                oneOf:
                                  - type: object
                                    properties:
                                      id:
                                        description: The unique identifier for the Custom Field
                                        type: integer
                                        examples:
                                          - 123
                                      field_type:
                                        description: The type of the Custom Field
                                        type: string
                                        enum:
                                          - SELECT
                                        examples:
                                          - SELECT
                                      value:
                                        description: The current values of the Custom Field in this resource
                                        type:
                                          - array
                                          - 'null'
                                        items:
                                          type: object
                                          properties:
                                            option_id:
                                              description: The ID of the selected option
                                              type: integer
                                              examples:
                                                - 123
                                            option_code:
                                              description: The code of the selected option
                                              type:
                                                - string
                                                - 'null'
                                              examples:
                                                - OP01
                                            value:
                                              description: The value of the selected option
                                              type: string
                                              examples:
                                                - My Option 1
                                      configs:
                                        type: object
                                        properties:
                                          label:
                                            description: The label for the Custom Field
                                            type: string
                                            examples:
                                              - My field X
                                          code:
                                            description: The unique code for the Custom Field
                                            type: string
                                            examples:
                                              - C01
                                          required:
                                            description: Specifies if the Custom Field is required
                                            type: boolean
                                            examples:
                                              - true
                                          are_values_readonly:
                                            description: >-
                                              Specifies if the Custom Field values are read only (so only integrations
                                              can set them).
                                            type: boolean
                                            examples:
                                              - false
                                          archived_at:
                                            description: >-
                                              Indicates when the custom field was archived for this object type. Objects
                                              that belong to the archived type will still display the custom field value
                                              if it was configured before the archiving.
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-03-12 12:12:12'
                                          type_settings:
                                            description: The type settings for the Custom Field
                                            type: object
                                            properties:
                                              allow_multiple_selection:
                                                description: Indicates if the Custom Field supports selecting multiple values
                                                type: boolean
                                                examples:
                                                  - true
                                              managed_by_integrations:
                                                description: Indicates if the Custom Field options are only managed by integrations
                                                type: boolean
                                                examples:
                                                  - true
                                  - type: object
                                    properties:
                                      id:
                                        description: The unique identifier for the Custom Field
                                        type: integer
                                        examples:
                                          - 123
                                      field_type:
                                        description: The type of the Custom Field
                                        type: string
                                        enum:
                                          - TEXT
                                        examples:
                                          - TEXT
                                      value:
                                        description: The current value of the Custom Field in this resource
                                        type:
                                          - string
                                          - 'null'
                                        examples:
                                          - abc
                                      configs:
                                        type: object
                                        properties:
                                          label:
                                            description: The label for the Custom Field
                                            type: string
                                            examples:
                                              - My field X
                                          code:
                                            description: The unique code for the Custom Field
                                            type: string
                                            examples:
                                              - C01
                                          required:
                                            description: Specifies if the Custom Field is required
                                            type: boolean
                                            examples:
                                              - true
                                          are_values_readonly:
                                            description: >-
                                              Specifies if the Custom Field values are read only (so only integrations
                                              can set them).
                                            type: boolean
                                            examples:
                                              - false
                                          archived_at:
                                            description: >-
                                              Indicates when the custom field was archived for this object type. Objects
                                              that belong to the archived type will still display the custom field value
                                              if it was configured before the archiving.
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-03-12 12:12:12'
                                          type_settings:
                                            description: >-
                                              The type settings for the Custom Field (Empty for Custom Fields of type
                                              TEXT)
                                            type: object
                                  - type: object
                                    properties:
                                      id:
                                        description: The unique identifier for the Custom Field
                                        type: integer
                                        examples:
                                          - 123
                                      field_type:
                                        description: The type of the Custom Field
                                        type: string
                                        enum:
                                          - BOOLEAN
                                        examples:
                                          - BOOLEAN
                                      value:
                                        description: The current value of the Custom Field in this resource
                                        type:
                                          - boolean
                                          - 'null'
                                        examples:
                                          - true
                                      configs:
                                        type: object
                                        properties:
                                          label:
                                            description: The label for the Custom Field
                                            type: string
                                            examples:
                                              - My field X
                                          code:
                                            description: The unique code for the Custom Field
                                            type: string
                                            examples:
                                              - C01
                                          required:
                                            description: Specifies if the Custom Field is required
                                            type: boolean
                                            examples:
                                              - true
                                          are_values_readonly:
                                            description: >-
                                              Specifies if the Custom Field values are read only (so only integrations
                                              can set them).
                                            type: boolean
                                            examples:
                                              - false
                                          archived_at:
                                            description: >-
                                              Indicates when the custom field was archived for this object type. Objects
                                              that belong to the archived type will still display the custom field value
                                              if it was configured before the archiving.
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-03-12 12:12:12'
                                          type_settings:
                                            description: >-
                                              The type settings for the Custom Field (There are none for the Custom
                                              Field Boolean type)
                                            type: object
                                  - type: object
                                    properties:
                                      id:
                                        description: The unique identifier for the Custom Field
                                        type: integer
                                        examples:
                                          - 123
                                      field_type:
                                        description: The type of the Custom Field
                                        type: string
                                        enum:
                                          - RELATIONSHIP
                                        examples:
                                          - RELATIONSHIP
                                      value:
                                        description: The current values of the Custom Field in this resource
                                        type:
                                          - array
                                          - 'null'
                                        items:
                                          type: object
                                          properties:
                                            related_to_type:
                                              description: The type of object that is selected as the Custom Field Values
                                              type: string
                                              enum:
                                                - CLIENT
                                                - CONTACT
                                              examples:
                                                - CLIENT
                                            related_to_id:
                                              description: The ID of object that is selected as the Custom Field Value
                                              type: integer
                                              examples:
                                                - 123
                                      configs:
                                        type: object
                                        properties:
                                          label:
                                            description: The label for the Custom Field
                                            type: string
                                            examples:
                                              - My field X
                                          code:
                                            description: The unique code for the Custom Field
                                            type: string
                                            examples:
                                              - C01
                                          required:
                                            description: Specifies if the Custom Field is required
                                            type: boolean
                                            examples:
                                              - true
                                          are_values_readonly:
                                            description: >-
                                              Specifies if the Custom Field values are read only (so only integrations
                                              can set them).
                                            type: boolean
                                            examples:
                                              - false
                                          archived_at:
                                            description: >-
                                              Indicates when the custom field was archived for this object type. Objects
                                              that belong to the archived type will still display the custom field value
                                              if it was configured before the archiving.
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-03-12 12:12:12'
                                          type_settings:
                                            description: The type settings for the Custom Field
                                            type: object
                                            properties:
                                              allow_multiple_selection:
                                                description: Indicates if the Custom Field allows multiple selection
                                                type: boolean
                                                examples:
                                                  - false
                                              relationship_object:
                                                description: The type of object that is selected as the Custom Field Values
                                                type: string
                                                enum:
                                                  - CLIENT
                                                  - CONTACT
                                                examples:
                                                  - CLIENT
                                  - type: object
                                    properties:
                                      id:
                                        description: The unique identifier for the Custom Field
                                        type: integer
                                        examples:
                                          - 123
                                      field_type:
                                        description: The type of the Custom Field
                                        type: string
                                        enum:
                                          - DATETIME
                                        examples:
                                          - DATETIME
                                      value:
                                        description: The current value of the Custom Field in this resource
                                        type:
                                          - string
                                          - 'null'
                                        format: date-time
                                        examples:
                                          - '2025-12-12 12:39:00'
                                      configs:
                                        type: object
                                        properties:
                                          label:
                                            description: The label for the Custom Field
                                            type: string
                                            examples:
                                              - My field X
                                          code:
                                            description: The unique code for the Custom Field
                                            type: string
                                            examples:
                                              - C01
                                          required:
                                            description: Specifies if the Custom Field is required
                                            type: boolean
                                            examples:
                                              - true
                                          are_values_readonly:
                                            description: >-
                                              Specifies if the Custom Field values are read only (so only integrations
                                              can set them).
                                            type: boolean
                                            examples:
                                              - false
                                          archived_at:
                                            description: >-
                                              Indicates when the custom field was archived for this object type. Objects
                                              that belong to the archived type will still display the custom field value
                                              if it was configured before the archiving.
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-03-12 12:12:12'
                                          type_settings:
                                            description: The type settings for the Custom Field
                                            type: object
                                            properties:
                                              allow_past_dates:
                                                description: Indicates if this Custom Field support past dates
                                                type: boolean
                                                examples:
                                                  - false
                                              allow_future_dates:
                                                description: Indicates if this Custom Field support future dates
                                                type: boolean
                                                examples:
                                                  - true
                                  - type: object
                                    properties:
                                      id:
                                        description: The unique identifier for the Custom Field
                                        type: integer
                                        examples:
                                          - 123
                                      field_type:
                                        description: The type of the Custom Field
                                        type: string
                                        enum:
                                          - NUMBER
                                        examples:
                                          - NUMBER
                                      value:
                                        description: The current value of the Custom Field in this resource
                                        type:
                                          - integer
                                          - 'null'
                                        examples:
                                          - 12
                                      configs:
                                        type: object
                                        properties:
                                          label:
                                            description: The label for the Custom Field
                                            type: string
                                            examples:
                                              - My field X
                                          code:
                                            description: The unique code for the Custom Field
                                            type: string
                                            examples:
                                              - C01
                                          required:
                                            description: Specifies if the Custom Field is required
                                            type: boolean
                                            examples:
                                              - true
                                          are_values_readonly:
                                            description: >-
                                              Specifies if the Custom Field values are read only (so only integrations
                                              can set them).
                                            type: boolean
                                            examples:
                                              - false
                                          archived_at:
                                            description: >-
                                              Indicates when the custom field was archived for this object type. Objects
                                              that belong to the archived type will still display the custom field value
                                              if it was configured before the archiving.
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-03-12 12:12:12'
                                          type_settings:
                                            description: The type settings for the Custom Field
                                            type: object
                                            properties:
                                              min:
                                                description: Indicates the minimum value for the Custom Field
                                                type:
                                                  - integer
                                                  - 'null'
                                                examples:
                                                  - 1
                                              max:
                                                description: Indicates the maximum value for the Custom Field
                                                type:
                                                  - integer
                                                  - 'null'
                                                examples:
                                                  - 3
                                discriminator:
                                  propertyName: field_type
                  meta:
                    title: Meta
                    description: Meta model structure details
                    type: object
                    properties:
                      pagination:
                        type: object
                        properties:
                          total:
                            description: Total items.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          count:
                            description: Total items returned for the current page.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          per_page:
                            description: Maximum number of records per page.
                            type: integer
                            minimum: 1
                            default: 200
                            examples:
                              - 1
                          current_page:
                            description: Number of the current page.
                            type: integer
                            minimum: 1
                            default: 1
                          total_pages:
                            description: Number of the total pages.
                            type: integer
                            minimum: 1
                            default: 1
                        required:
                          - total
                          - count
                          - per_page
                          - current_page
                          - total_pages
                  links:
                    title: Response Links on listing operations
                    description: >-
                      Requests that return multiple items include a `links` attribute, with links related to request's
                      context.
                    type: object
                    properties:
                      self:
                        description: Current response link.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      first:
                        description: Link to the first page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      last:
                        description: Link to the previous page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      next:
                        description: Link to the next page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                    required:
                      - self
                      - first
                      - last
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
      x-spectator: true
    post:
      operationId: createQuote
      tags:
        - Quotes
      summary: Create a Quote
      description: This endpoint allows you to create a Quote.
      requestBody:
        content:
          application/json:
            schema:
              description: Quote payload
              type: object
              properties:
                client_id:
                  type: integer
                related_to_type:
                  description: Type of object (failure or scheduled work) related to the quote.
                  type: string
                  enum:
                    - FAILURE
                    - SCHEDULED_WORK
                related_to_id:
                  description: ID of the object (failure or scheduled work) related to the quote
                  type: integer
                received_quote_request_id:
                  description: ID of the Received Quote Request
                  type: integer
        required: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: Quote
                    description: Quote model structure details
                    type: object
                    properties:
                      id:
                        description: ID of the Quote.
                        type: string
                        readOnly: true
                      type:
                        description: Model type
                        type: string
                        enum:
                          - quote
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          quote_id:
                            description: ID of the Quote.
                            type: integer
                            readOnly: true
                          quote_uuid:
                            description: UUID of the Quote.
                            type:
                              - string
                              - 'null'
                            format: uuid
                            readOnly: true
                          code:
                            description: Code of the Quote. Visible on Infraspeak platform.
                            type: integer
                            readOnly: true
                          client_id:
                            description: ID of the Client associated to the quote.
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          state:
                            description: State of the Quote.
                            type: string
                            enum:
                              - DRAFT
                              - READY
                              - ACCEPTED
                              - DECLINED
                              - CANCELLED
                              - CONVERTED_TO_SALE
                            default: DRAFT
                            examples:
                              - DRAFT
                          entity_id:
                            type: integer
                            readOnly: true
                          created_at:
                            allOf:
                              - type:
                                  - string
                                  - 'null'
                                pattern: >-
                                  ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                  ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                examples:
                                  - '2021-07-21 18:38:00'
                              - description: Creation date of the Quote
                                readOnly: true
                          created_by:
                            description: ID of the operator that created the Quote.
                            type: integer
                            readOnly: true
                          started_at:
                            allOf:
                              - type:
                                  - string
                                  - 'null'
                                pattern: >-
                                  ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                  ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                examples:
                                  - '2021-07-21 18:38:00'
                              - description: Date when Quote has started.
                                type:
                                  - string
                                  - 'null'
                                readOnly: true
                          started_by:
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          ready_at:
                            allOf:
                              - type:
                                  - string
                                  - 'null'
                                pattern: >-
                                  ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                  ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                examples:
                                  - '2021-07-21 18:38:00'
                              - description: Date Quote is marked as Awaiting.
                                type:
                                  - string
                                  - 'null'
                                readOnly: true
                          ready_by_id:
                            description: ID of the user who marked the quote as Awaiting.
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          ready_by_type:
                            description: Type of user who marked the Quote as Awaiting.
                            type:
                              - string
                              - 'null'
                            enum:
                              - OPERATOR
                              - CONTACT
                              - null
                            default: OPERATOR
                          accepted_at:
                            allOf:
                              - type:
                                  - string
                                  - 'null'
                                pattern: >-
                                  ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                  ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                examples:
                                  - '2021-07-21 18:38:00'
                              - description: Date Quote is accepted.
                                type:
                                  - string
                                  - 'null'
                                readOnly: true
                          accepted_by_id:
                            description: ID of the user who accepted the Quote.
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          accepted_by_type:
                            description: Type of user who accepted the Quote.
                            type:
                              - string
                              - 'null'
                            enum:
                              - OPERATOR
                              - CONTACT
                              - null
                            default: OPERATOR
                          declined_at:
                            allOf:
                              - type:
                                  - string
                                  - 'null'
                                pattern: >-
                                  ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                  ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                examples:
                                  - '2021-07-21 18:38:00'
                              - description: Date Quote was declined.
                                type:
                                  - string
                                  - 'null'
                                readOnly: true
                          declined_by_id:
                            description: ID of the user who declined the quote.
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          declined_by_type:
                            description: Type of user who declined the Quote.
                            type:
                              - string
                              - 'null'
                            enum:
                              - OPERATOR
                              - CONTACT
                              - null
                            default: OPERATOR
                          cancelled_by:
                            description: ID of the user who cancelled the quote.
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          cancelled_at:
                            allOf:
                              - type:
                                  - string
                                  - 'null'
                                pattern: >-
                                  ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                  ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                examples:
                                  - '2021-07-21 18:38:00'
                              - description: Date Quote was cancelled.
                                type:
                                  - string
                                  - 'null'
                                readOnly: true
                          last_sent_at:
                            allOf:
                              - type:
                                  - string
                                  - 'null'
                                pattern: >-
                                  ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                  ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                examples:
                                  - '2021-07-21 18:38:00'
                              - description: Date Quote was last sent.
                                type:
                                  - string
                                  - 'null'
                                readOnly: true
                          last_sent_by:
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          last_share_at:
                            allOf:
                              - type:
                                  - string
                                  - 'null'
                                pattern: >-
                                  ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                  ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                examples:
                                  - '2021-07-21 18:38:00'
                              - description: Date Quote was last shared.
                                type:
                                  - string
                                  - 'null'
                                readOnly: true
                          last_share_by:
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          converted_by:
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          converted_at:
                            allOf:
                              - type:
                                  - string
                                  - 'null'
                                pattern: >-
                                  ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                  ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                examples:
                                  - '2021-07-21 18:38:00'
                              - description: Date Quote was converted.
                                type:
                                  - string
                                  - 'null'
                                readOnly: true
                          description:
                            description: Quote observations.
                            type:
                              - string
                              - 'null'
                          internal_quote_id:
                            description: Internal ID of the Quote.
                            type:
                              - string
                              - 'null'
                            readOnly: true
                            examples:
                              - FS-123
                          external_quote_id:
                            description: External ID of the Quote.
                            type:
                              - string
                              - 'null'
                            readOnly: true
                            examples:
                              - FS-123
                          related_to_type:
                            description: Type of object related to the quote.
                            type:
                              - string
                              - 'null'
                            enum:
                              - FAILURE
                              - SCHEDULED_WORK
                              - null
                            examples:
                              - FAILURE
                          related_to_id:
                            description: ID of the object (failure or scheduled work) related to the quote.
                            type:
                              - integer
                              - 'null'
                          base_total:
                            description: Total Base value of the Quote, without VAT and discount.
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          discount_total:
                            description: Total value of the discount applied to the Quote items.
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          vat_total:
                            description: Total value of the VAT applied to the Quote items.
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          total:
                            description: Total value of the Quote, considering the discount and VAT applied.
                            type: integer
                            readOnly: true
                          sell_order_id:
                            description: ID of the Sale associated to the Quote, after converted.
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          updated_at:
                            allOf:
                              - type:
                                  - string
                                  - 'null'
                                pattern: >-
                                  ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                  ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                examples:
                                  - '2021-07-21 18:38:00'
                              - description: Date Quote was updated.
                                type:
                                  - string
                                  - 'null'
                                readOnly: true
                          deleted_at:
                            allOf:
                              - type:
                                  - string
                                  - 'null'
                                pattern: >-
                                  ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                  ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                examples:
                                  - '2021-07-21 18:38:00'
                              - description: Date Quote was deleted.
                                type:
                                  - string
                                  - 'null'
                                readOnly: true
                          quote_request_id:
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          received_quote_request_id:
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          is_from_network:
                            type: boolean
                            readOnly: true
                          client_answer:
                            type: object
                            properties:
                              clientUserName:
                                type: string
                              clientName:
                                type: string
                              answer:
                                type: string
                      meta:
                        type: object
                        properties:
                          custom_fields:
                            type:
                              - object
                              - 'null'
                            additionalProperties:
                              oneOf:
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - SELECT
                                      examples:
                                        - SELECT
                                    value:
                                      description: The current values of the Custom Field in this resource
                                      type:
                                        - array
                                        - 'null'
                                      items:
                                        type: object
                                        properties:
                                          option_id:
                                            description: The ID of the selected option
                                            type: integer
                                            examples:
                                              - 123
                                          option_code:
                                            description: The code of the selected option
                                            type:
                                              - string
                                              - 'null'
                                            examples:
                                              - OP01
                                          value:
                                            description: The value of the selected option
                                            type: string
                                            examples:
                                              - My Option 1
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: The type settings for the Custom Field
                                          type: object
                                          properties:
                                            allow_multiple_selection:
                                              description: Indicates if the Custom Field supports selecting multiple values
                                              type: boolean
                                              examples:
                                                - true
                                            managed_by_integrations:
                                              description: Indicates if the Custom Field options are only managed by integrations
                                              type: boolean
                                              examples:
                                                - true
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - TEXT
                                      examples:
                                        - TEXT
                                    value:
                                      description: The current value of the Custom Field in this resource
                                      type:
                                        - string
                                        - 'null'
                                      examples:
                                        - abc
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: >-
                                            The type settings for the Custom Field (Empty for Custom Fields of type
                                            TEXT)
                                          type: object
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - BOOLEAN
                                      examples:
                                        - BOOLEAN
                                    value:
                                      description: The current value of the Custom Field in this resource
                                      type:
                                        - boolean
                                        - 'null'
                                      examples:
                                        - true
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: >-
                                            The type settings for the Custom Field (There are none for the Custom Field
                                            Boolean type)
                                          type: object
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - RELATIONSHIP
                                      examples:
                                        - RELATIONSHIP
                                    value:
                                      description: The current values of the Custom Field in this resource
                                      type:
                                        - array
                                        - 'null'
                                      items:
                                        type: object
                                        properties:
                                          related_to_type:
                                            description: The type of object that is selected as the Custom Field Values
                                            type: string
                                            enum:
                                              - CLIENT
                                              - CONTACT
                                            examples:
                                              - CLIENT
                                          related_to_id:
                                            description: The ID of object that is selected as the Custom Field Value
                                            type: integer
                                            examples:
                                              - 123
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: The type settings for the Custom Field
                                          type: object
                                          properties:
                                            allow_multiple_selection:
                                              description: Indicates if the Custom Field allows multiple selection
                                              type: boolean
                                              examples:
                                                - false
                                            relationship_object:
                                              description: The type of object that is selected as the Custom Field Values
                                              type: string
                                              enum:
                                                - CLIENT
                                                - CONTACT
                                              examples:
                                                - CLIENT
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - DATETIME
                                      examples:
                                        - DATETIME
                                    value:
                                      description: The current value of the Custom Field in this resource
                                      type:
                                        - string
                                        - 'null'
                                      format: date-time
                                      examples:
                                        - '2025-12-12 12:39:00'
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: The type settings for the Custom Field
                                          type: object
                                          properties:
                                            allow_past_dates:
                                              description: Indicates if this Custom Field support past dates
                                              type: boolean
                                              examples:
                                                - false
                                            allow_future_dates:
                                              description: Indicates if this Custom Field support future dates
                                              type: boolean
                                              examples:
                                                - true
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - NUMBER
                                      examples:
                                        - NUMBER
                                    value:
                                      description: The current value of the Custom Field in this resource
                                      type:
                                        - integer
                                        - 'null'
                                      examples:
                                        - 12
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: The type settings for the Custom Field
                                          type: object
                                          properties:
                                            min:
                                              description: Indicates the minimum value for the Custom Field
                                              type:
                                                - integer
                                                - 'null'
                                              examples:
                                                - 1
                                            max:
                                              description: Indicates the maximum value for the Custom Field
                                              type:
                                                - integer
                                                - 'null'
                                              examples:
                                                - 3
                              discriminator:
                                propertyName: field_type
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '403':
          description: Forbidden. The action can not be fulfilled.
          content:
            application/json:
              schema:
                title: 403 Forbidden
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 403
                      message:
                        type: string
                        examples:
                          - Action unauthorized
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 403
                      message: Action unauthorized
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
      x-spectator: true
  /sales/quotes/{id}:
    get:
      operationId: getQuote
      tags:
        - Quotes
      summary: Get a Quote
      description: This endpoint allows you to get a specific Quote.
      parameters:
        - name: id
          in: path
          description: The Quote ID
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: Quote
                    description: Quote model structure details
                    type: object
                    properties:
                      id:
                        description: ID of the Quote.
                        type: string
                        readOnly: true
                      type:
                        description: Model type
                        type: string
                        enum:
                          - quote
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          quote_id:
                            description: ID of the Quote.
                            type: integer
                            readOnly: true
                          quote_uuid:
                            description: UUID of the Quote.
                            type:
                              - string
                              - 'null'
                            format: uuid
                            readOnly: true
                          code:
                            description: Code of the Quote. Visible on Infraspeak platform.
                            type: integer
                            readOnly: true
                          client_id:
                            description: ID of the Client associated to the quote.
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          state:
                            description: State of the Quote.
                            type: string
                            enum:
                              - DRAFT
                              - READY
                              - ACCEPTED
                              - DECLINED
                              - CANCELLED
                              - CONVERTED_TO_SALE
                            default: DRAFT
                            examples:
                              - DRAFT
                          entity_id:
                            type: integer
                            readOnly: true
                          created_at:
                            allOf:
                              - type:
                                  - string
                                  - 'null'
                                pattern: >-
                                  ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                  ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                examples:
                                  - '2021-07-21 18:38:00'
                              - description: Creation date of the Quote
                                readOnly: true
                          created_by:
                            description: ID of the operator that created the Quote.
                            type: integer
                            readOnly: true
                          started_at:
                            allOf:
                              - type:
                                  - string
                                  - 'null'
                                pattern: >-
                                  ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                  ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                examples:
                                  - '2021-07-21 18:38:00'
                              - description: Date when Quote has started.
                                type:
                                  - string
                                  - 'null'
                                readOnly: true
                          started_by:
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          ready_at:
                            allOf:
                              - type:
                                  - string
                                  - 'null'
                                pattern: >-
                                  ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                  ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                examples:
                                  - '2021-07-21 18:38:00'
                              - description: Date Quote is marked as Awaiting.
                                type:
                                  - string
                                  - 'null'
                                readOnly: true
                          ready_by_id:
                            description: ID of the user who marked the quote as Awaiting.
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          ready_by_type:
                            description: Type of user who marked the Quote as Awaiting.
                            type:
                              - string
                              - 'null'
                            enum:
                              - OPERATOR
                              - CONTACT
                              - null
                            default: OPERATOR
                          accepted_at:
                            allOf:
                              - type:
                                  - string
                                  - 'null'
                                pattern: >-
                                  ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                  ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                examples:
                                  - '2021-07-21 18:38:00'
                              - description: Date Quote is accepted.
                                type:
                                  - string
                                  - 'null'
                                readOnly: true
                          accepted_by_id:
                            description: ID of the user who accepted the Quote.
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          accepted_by_type:
                            description: Type of user who accepted the Quote.
                            type:
                              - string
                              - 'null'
                            enum:
                              - OPERATOR
                              - CONTACT
                              - null
                            default: OPERATOR
                          declined_at:
                            allOf:
                              - type:
                                  - string
                                  - 'null'
                                pattern: >-
                                  ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                  ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                examples:
                                  - '2021-07-21 18:38:00'
                              - description: Date Quote was declined.
                                type:
                                  - string
                                  - 'null'
                                readOnly: true
                          declined_by_id:
                            description: ID of the user who declined the quote.
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          declined_by_type:
                            description: Type of user who declined the Quote.
                            type:
                              - string
                              - 'null'
                            enum:
                              - OPERATOR
                              - CONTACT
                              - null
                            default: OPERATOR
                          cancelled_by:
                            description: ID of the user who cancelled the quote.
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          cancelled_at:
                            allOf:
                              - type:
                                  - string
                                  - 'null'
                                pattern: >-
                                  ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                  ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                examples:
                                  - '2021-07-21 18:38:00'
                              - description: Date Quote was cancelled.
                                type:
                                  - string
                                  - 'null'
                                readOnly: true
                          last_sent_at:
                            allOf:
                              - type:
                                  - string
                                  - 'null'
                                pattern: >-
                                  ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                  ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                examples:
                                  - '2021-07-21 18:38:00'
                              - description: Date Quote was last sent.
                                type:
                                  - string
                                  - 'null'
                                readOnly: true
                          last_sent_by:
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          last_share_at:
                            allOf:
                              - type:
                                  - string
                                  - 'null'
                                pattern: >-
                                  ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                  ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                examples:
                                  - '2021-07-21 18:38:00'
                              - description: Date Quote was last shared.
                                type:
                                  - string
                                  - 'null'
                                readOnly: true
                          last_share_by:
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          converted_by:
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          converted_at:
                            allOf:
                              - type:
                                  - string
                                  - 'null'
                                pattern: >-
                                  ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                  ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                examples:
                                  - '2021-07-21 18:38:00'
                              - description: Date Quote was converted.
                                type:
                                  - string
                                  - 'null'
                                readOnly: true
                          description:
                            description: Quote observations.
                            type:
                              - string
                              - 'null'
                          internal_quote_id:
                            description: Internal ID of the Quote.
                            type:
                              - string
                              - 'null'
                            readOnly: true
                            examples:
                              - FS-123
                          external_quote_id:
                            description: External ID of the Quote.
                            type:
                              - string
                              - 'null'
                            readOnly: true
                            examples:
                              - FS-123
                          related_to_type:
                            description: Type of object related to the quote.
                            type:
                              - string
                              - 'null'
                            enum:
                              - FAILURE
                              - SCHEDULED_WORK
                              - null
                            examples:
                              - FAILURE
                          related_to_id:
                            description: ID of the object (failure or scheduled work) related to the quote.
                            type:
                              - integer
                              - 'null'
                          base_total:
                            description: Total Base value of the Quote, without VAT and discount.
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          discount_total:
                            description: Total value of the discount applied to the Quote items.
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          vat_total:
                            description: Total value of the VAT applied to the Quote items.
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          total:
                            description: Total value of the Quote, considering the discount and VAT applied.
                            type: integer
                            readOnly: true
                          sell_order_id:
                            description: ID of the Sale associated to the Quote, after converted.
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          updated_at:
                            allOf:
                              - type:
                                  - string
                                  - 'null'
                                pattern: >-
                                  ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                  ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                examples:
                                  - '2021-07-21 18:38:00'
                              - description: Date Quote was updated.
                                type:
                                  - string
                                  - 'null'
                                readOnly: true
                          deleted_at:
                            allOf:
                              - type:
                                  - string
                                  - 'null'
                                pattern: >-
                                  ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                  ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                examples:
                                  - '2021-07-21 18:38:00'
                              - description: Date Quote was deleted.
                                type:
                                  - string
                                  - 'null'
                                readOnly: true
                          quote_request_id:
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          received_quote_request_id:
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          is_from_network:
                            type: boolean
                            readOnly: true
                          client_answer:
                            type: object
                            properties:
                              clientUserName:
                                type: string
                              clientName:
                                type: string
                              answer:
                                type: string
                      meta:
                        type: object
                        properties:
                          custom_fields:
                            type:
                              - object
                              - 'null'
                            additionalProperties:
                              oneOf:
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - SELECT
                                      examples:
                                        - SELECT
                                    value:
                                      description: The current values of the Custom Field in this resource
                                      type:
                                        - array
                                        - 'null'
                                      items:
                                        type: object
                                        properties:
                                          option_id:
                                            description: The ID of the selected option
                                            type: integer
                                            examples:
                                              - 123
                                          option_code:
                                            description: The code of the selected option
                                            type:
                                              - string
                                              - 'null'
                                            examples:
                                              - OP01
                                          value:
                                            description: The value of the selected option
                                            type: string
                                            examples:
                                              - My Option 1
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: The type settings for the Custom Field
                                          type: object
                                          properties:
                                            allow_multiple_selection:
                                              description: Indicates if the Custom Field supports selecting multiple values
                                              type: boolean
                                              examples:
                                                - true
                                            managed_by_integrations:
                                              description: Indicates if the Custom Field options are only managed by integrations
                                              type: boolean
                                              examples:
                                                - true
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - TEXT
                                      examples:
                                        - TEXT
                                    value:
                                      description: The current value of the Custom Field in this resource
                                      type:
                                        - string
                                        - 'null'
                                      examples:
                                        - abc
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: >-
                                            The type settings for the Custom Field (Empty for Custom Fields of type
                                            TEXT)
                                          type: object
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - BOOLEAN
                                      examples:
                                        - BOOLEAN
                                    value:
                                      description: The current value of the Custom Field in this resource
                                      type:
                                        - boolean
                                        - 'null'
                                      examples:
                                        - true
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: >-
                                            The type settings for the Custom Field (There are none for the Custom Field
                                            Boolean type)
                                          type: object
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - RELATIONSHIP
                                      examples:
                                        - RELATIONSHIP
                                    value:
                                      description: The current values of the Custom Field in this resource
                                      type:
                                        - array
                                        - 'null'
                                      items:
                                        type: object
                                        properties:
                                          related_to_type:
                                            description: The type of object that is selected as the Custom Field Values
                                            type: string
                                            enum:
                                              - CLIENT
                                              - CONTACT
                                            examples:
                                              - CLIENT
                                          related_to_id:
                                            description: The ID of object that is selected as the Custom Field Value
                                            type: integer
                                            examples:
                                              - 123
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: The type settings for the Custom Field
                                          type: object
                                          properties:
                                            allow_multiple_selection:
                                              description: Indicates if the Custom Field allows multiple selection
                                              type: boolean
                                              examples:
                                                - false
                                            relationship_object:
                                              description: The type of object that is selected as the Custom Field Values
                                              type: string
                                              enum:
                                                - CLIENT
                                                - CONTACT
                                              examples:
                                                - CLIENT
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - DATETIME
                                      examples:
                                        - DATETIME
                                    value:
                                      description: The current value of the Custom Field in this resource
                                      type:
                                        - string
                                        - 'null'
                                      format: date-time
                                      examples:
                                        - '2025-12-12 12:39:00'
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: The type settings for the Custom Field
                                          type: object
                                          properties:
                                            allow_past_dates:
                                              description: Indicates if this Custom Field support past dates
                                              type: boolean
                                              examples:
                                                - false
                                            allow_future_dates:
                                              description: Indicates if this Custom Field support future dates
                                              type: boolean
                                              examples:
                                                - true
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - NUMBER
                                      examples:
                                        - NUMBER
                                    value:
                                      description: The current value of the Custom Field in this resource
                                      type:
                                        - integer
                                        - 'null'
                                      examples:
                                        - 12
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: The type settings for the Custom Field
                                          type: object
                                          properties:
                                            min:
                                              description: Indicates the minimum value for the Custom Field
                                              type:
                                                - integer
                                                - 'null'
                                              examples:
                                                - 1
                                            max:
                                              description: Indicates the maximum value for the Custom Field
                                              type:
                                                - integer
                                                - 'null'
                                              examples:
                                                - 3
                              discriminator:
                                propertyName: field_type
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '403':
          description: Forbidden. The action can not be fulfilled.
          content:
            application/json:
              schema:
                title: 403 Forbidden
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 403
                      message:
                        type: string
                        examples:
                          - Action unauthorized
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 403
                      message: Action unauthorized
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
      x-spectator: true
  /sales/quotes/{id}/lines:
    get:
      operationId: getQuoteLines
      tags:
        - Quotes
      summary: List all Quote Lines
      description: This endpoint allows you to list all Quote Lines for a specific Quote.
      parameters:
        - name: id
          in: path
          description: The Quote ID
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: Quote Line
                    description: Quote Line model structure details
                    type: object
                    properties:
                      id:
                        description: ID of the Quote Line
                        type: string
                        readOnly: true
                      type:
                        description: Model type
                        type: string
                        enum:
                          - quote_line
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          material_id:
                            description: ID of the associated Material, if the type is "MATERIAL".
                            type:
                              - integer
                              - 'null'
                          description:
                            description: The description of the Quote Line, if the type is "SERVICE".
                            type:
                              - string
                              - 'null'
                          type:
                            description: Type of the item in the Quote Line.
                            type: string
                            enum:
                              - MATERIAL
                              - SERVICE
                              - OTHER_COST
                          base_total:
                            description: Total base price of the Quote Line.
                            type: number
                          discount:
                            description: Discount applied to the item in the Quote Line.
                            type: number
                          discount_total:
                            description: Total discount of the Quote Line.
                            type: number
                          observations:
                            description: Observation or notes of the Quote Line.
                            type:
                              - string
                              - 'null'
                          other_cost_id:
                            description: ID of the associated Other Cost, if the type is "OTHER_COST".
                            type:
                              - integer
                              - 'null'
                          quantity:
                            description: Quantity of the item in the Quote Line.
                            type: number
                          quote_line_uuid:
                            description: Uuid for Quote Line.
                            type: string
                          received_quote_request_line_id:
                            description: ID of the Received Quote Request Line.
                            type:
                              - integer
                              - 'null'
                          received_quote_request_line_uuid:
                            description: ID of the Received Quote Request Line.
                            type:
                              - string
                              - 'null'
                          total:
                            description: Total price of the Quote Line.
                            type: number
                          unit:
                            description: Units of the item in the Quote Line.
                            type:
                              - string
                              - 'null'
                          unit_price:
                            description: Price per unit of the item in the Quote Line.
                            type: number
                          vat:
                            description: VAT applied to the item in the Quote Line.
                            type: number
                          vat_total:
                            description: Total VAT applied to the Quote Line.
                            type: number
                    required:
                      - id
                      - type
                      - attributes
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
    post:
      operationId: createQuoteLine
      tags:
        - Quotes
      summary: Create Quote Line
      description: This endpoint allows you to create a Quote Line for a specific Quote.
      parameters:
        - name: id
          in: path
          description: The Quote ID
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              description: Quote line payload
              type: object
              properties:
                description:
                  description: The description of the Quote Line. Required if the type is "SERVICE".
                  type: string
                type:
                  description: Type of the item in the Quote Line.
                  type: string
                discount:
                  description: Discount applied to the item in the Quote Line.
                  type: integer
                  minimum: 0
                  maximum: 100
                material_id:
                  description: ID of the associated Material. Required if the type is "MATERIAL".
                  type: integer
                observations:
                  description: Observation or notes of the Quote Line.
                  type: string
                other_cost_id:
                  description: ID of the associated Other Cost. Required if the type is "OTHER_COST".
                  type: integer
                quantity:
                  description: Quantity of the item in the Quote Line.
                  type: integer
                received_quote_request_line_id:
                  type:
                    - integer
                    - 'null'
                received_quote_request_line_uuid:
                  type:
                    - string
                    - 'null'
                unit:
                  description: Units of the item in the Quote Line.
                  type: string
                unit_price:
                  description: Price per unit of the item in the Quote Line.
                  type: integer
                vat:
                  description: VAT applied to the item in the Quote Line.
                  type: integer
                  minimum: 0
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: Quote Line
                    description: Quote Line model structure details
                    type: object
                    properties:
                      id:
                        description: ID of the Quote Line
                        type: string
                        readOnly: true
                      type:
                        description: Model type
                        type: string
                        enum:
                          - quote_line
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          material_id:
                            description: ID of the associated Material, if the type is "MATERIAL".
                            type:
                              - integer
                              - 'null'
                          description:
                            description: The description of the Quote Line, if the type is "SERVICE".
                            type:
                              - string
                              - 'null'
                          type:
                            description: Type of the item in the Quote Line.
                            type: string
                            enum:
                              - MATERIAL
                              - SERVICE
                              - OTHER_COST
                          base_total:
                            description: Total base price of the Quote Line.
                            type: number
                          discount:
                            description: Discount applied to the item in the Quote Line.
                            type: number
                          discount_total:
                            description: Total discount of the Quote Line.
                            type: number
                          observations:
                            description: Observation or notes of the Quote Line.
                            type:
                              - string
                              - 'null'
                          other_cost_id:
                            description: ID of the associated Other Cost, if the type is "OTHER_COST".
                            type:
                              - integer
                              - 'null'
                          quantity:
                            description: Quantity of the item in the Quote Line.
                            type: number
                          quote_line_uuid:
                            description: Uuid for Quote Line.
                            type: string
                          received_quote_request_line_id:
                            description: ID of the Received Quote Request Line.
                            type:
                              - integer
                              - 'null'
                          received_quote_request_line_uuid:
                            description: ID of the Received Quote Request Line.
                            type:
                              - string
                              - 'null'
                          total:
                            description: Total price of the Quote Line.
                            type: number
                          unit:
                            description: Units of the item in the Quote Line.
                            type:
                              - string
                              - 'null'
                          unit_price:
                            description: Price per unit of the item in the Quote Line.
                            type: number
                          vat:
                            description: VAT applied to the item in the Quote Line.
                            type: number
                          vat_total:
                            description: Total VAT applied to the Quote Line.
                            type: number
                    required:
                      - id
                      - type
                      - attributes
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '403':
          description: Forbidden. The action can not be fulfilled.
          content:
            application/json:
              schema:
                title: 403 Forbidden
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 403
                      message:
                        type: string
                        examples:
                          - Action unauthorized
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 403
                      message: Action unauthorized
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /sales/sell-orders:
    get:
      operationId: getSellOrders
      tags:
        - Sell Orders
      summary: List all Sell Orders
      description: This endpoint allows you to list all Sell Orders.
      parameters:
        - name: expanded
          in: query
          description: |
            This parameter allows to expand the resulting Sell Orders (Sales) relationships in the response.
          schema:
            type: string
            enum:
              - entity
              - createdBy
              - cancelledBy
              - completedBy
              - startedBy
              - client
              - contacts
              - failure
              - files
              - quote
              - scheduledWork
              - confirmedBy
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      title: Sell Order (Sale)
                      description: |
                        Sell Order (Sale) Resource structure details.
                      type: object
                      properties:
                        id:
                          description: ID for the Sell Order (Sale) in Infraspeak.
                          type: string
                          examples:
                            - '123'
                          readOnly: true
                        type:
                          description: Resource type
                          type: string
                          enum:
                            - sell_order
                          examples:
                            - sell_order
                          readOnly: true
                        attributes:
                          type: object
                          properties:
                            client_id:
                              description: |
                                ID of the client associated with the Sell Order (Sale).

                                **This field is required if `related_to_type` and `related_to_id` are not filled.**
                              type: integer
                              examples:
                                - 123
                            code:
                              description: Code used to identify the Sell Order (Sale) in Infraspeak.
                              type: integer
                              examples:
                                - 123
                              readOnly: true
                            sell_order_uuid:
                              description: Universally Unique Identifier (UUID) for the Sell Order (Sale).
                              type: string
                              format: uuid
                              examples:
                                - 3ac7648a-d628-47d8-b9a5-bf6c5edfe176
                              readOnly: true
                            state:
                              description: |
                                Current State for the Sell Order (Sale).

                                Possible states for a Sell Order (Sale) in Infraspeak are:
                                - `DRAFT`
                                - `CANCELLED`
                                - `RUNNING`
                                - `COMPLETED`
                                - `COMPLETED_CONFIRMED`
                              type: string
                              enum:
                                - DRAFT
                                - CANCELLED
                                - RUNNING
                                - COMPLETED
                                - COMPLETED_CONFIRMED
                              examples:
                                - DRAFT
                            entity_id:
                              description: |
                                ID for the Entity this Sell Order (Sale) belongs to in Infraspeak.
                              type: integer
                              examples:
                                - 123
                              readOnly: true
                            created_at:
                              description: Creation date of the Sell Order (Sale).
                              type: string
                              format: date-time
                              examples:
                                - '2020-08-28 08:48:00'
                              readOnly: true
                            created_by:
                              description: ID for the Operator who created the Sell Order (Sale).
                              type: integer
                              examples:
                                - 123
                            started_at:
                              description: Date indicating when the Sell Order (Sale) was Started (state 'RUNNING').
                              type:
                                - string
                                - 'null'
                              format: date-time
                              examples:
                                - '2020-08-28T08:48:00.000Z'
                              readOnly: true
                            started_by:
                              description: ID for the Operator who started the Sell Order (Sale).
                              type:
                                - integer
                                - 'null'
                              examples:
                                - 123
                            completed_at:
                              description: Date indicating when the Sell Order (Sale) was Completed (state 'COMPLETED').
                              type:
                                - string
                                - 'null'
                              format: date-time
                              examples:
                                - '2020-08-28T08:48:00.000Z'
                              readOnly: true
                            completed_by:
                              description: ID for the Operator who completed the Sell Order (Sale).
                              type:
                                - integer
                                - 'null'
                              examples:
                                - 123
                            cancelled_at:
                              description: Date indicating when the Sell Order (Sale) was Cancelled (state 'CANCELED').
                              type:
                                - string
                                - 'null'
                              format: date-time
                              examples:
                                - '2020-08-28T08:48:00.000Z'
                              readOnly: true
                            cancelled_by:
                              description: ID for the Operator that cancelled the Sell Order (Sale).
                              type:
                                - integer
                                - 'null'
                              examples:
                                - 123
                            description:
                              description: >
                                Observations or notes for the Sell Order (Sale).


                                This field is a free text input that holds any information regarding the Sell Order
                                (Sale), filled by the user.
                              type:
                                - string
                                - 'null'
                              examples:
                                - Some information regarding the sell Order (Sale)
                            internal_sale_id:
                              description: |
                                Internal ID of the Sell Order (Sale).
                              type:
                                - string
                                - 'null'
                              examples:
                                - '123'
                            external_sale_id:
                              description: >
                                External ID of the associated Sell Order (Sale).


                                Usually used to identify the Sell Order (Sale) with an unique identifier from a
                                third-party application.
                              type:
                                - string
                                - 'null'
                              examples:
                                - 1e29e166-c6b8-4686-8856-2090d8dc12e1
                            related_to_type:
                              description: |
                                Type of the Infraspeak Object related to the Sell Order (Sale).

                                **This is required when the field `related_to_id` is filled.**

                                Allowed values for this field are:
                                - `FAILURE` (Work Order)
                                - `SCHEDULED_WORK` (Planned Job Order)
                              type:
                                - string
                                - 'null'
                              enum:
                                - FAILURE
                                - SCHEDULED_WORK
                              examples:
                                - FAILURE
                            related_to_id:
                              description: |
                                ID for the Infraspeak Object related to the Sell Order (Sale).

                                **This is required when the field `related_to_type` is filled.**

                                Possible related objects to a Sell Order (Sale) are:
                                - `FAILURE` (Work Order)
                                - `SCHEDULED_WORK` (Planned Job Order)
                              type:
                                - integer
                                - 'null'
                              examples:
                                - 123
                            quote_id:
                              description: ID of the Quote that originated the Sell Order (Sale).
                              type:
                                - integer
                                - 'null'
                              examples:
                                - 123
                            base_total:
                              description: |
                                Total Base Price for the Sell Order (Sale).

                                **This does not include Taxes or Discounts.**
                              type: number
                              examples:
                                - 11.22
                            discount_total:
                              description: |
                                Discount total for the Sell Order (Sale).
                              type: number
                              examples:
                                - 0.22
                            vat_total:
                              description: |
                                Taxes total for the Sell Order (Sale).
                              type: number
                              examples:
                                - 1
                            total:
                              description: |
                                Total Price for the Sell Order (Sale) including Taxes and Discounts.
                              type: number
                              examples:
                                - 12
                            updated_at:
                              description: Date for the last change in the Sell Order (Sale).
                              type: string
                              format: date-time
                              examples:
                                - '2020-08-28T13:05:00.000Z'
                              readOnly: true
                            confirmed_by:
                              description: ID for the Operator that confirmed the Sell Order (Sale).
                              type:
                                - integer
                                - 'null'
                              examples:
                                - 123
                            confirmed_at:
                              description: Date indicating when the Operator confirmed the Sell Order (Sale).
                              type: string
                              format: date-time
                              examples:
                                - '2024-08-28T16:05:00.000Z'
                        meta:
                          type: object
                          properties:
                            custom_fields:
                              type:
                                - object
                                - 'null'
                              additionalProperties:
                                oneOf:
                                  - type: object
                                    properties:
                                      id:
                                        description: The unique identifier for the Custom Field
                                        type: integer
                                        examples:
                                          - 123
                                      field_type:
                                        description: The type of the Custom Field
                                        type: string
                                        enum:
                                          - SELECT
                                        examples:
                                          - SELECT
                                      value:
                                        description: The current values of the Custom Field in this resource
                                        type:
                                          - array
                                          - 'null'
                                        items:
                                          type: object
                                          properties:
                                            option_id:
                                              description: The ID of the selected option
                                              type: integer
                                              examples:
                                                - 123
                                            option_code:
                                              description: The code of the selected option
                                              type:
                                                - string
                                                - 'null'
                                              examples:
                                                - OP01
                                            value:
                                              description: The value of the selected option
                                              type: string
                                              examples:
                                                - My Option 1
                                      configs:
                                        type: object
                                        properties:
                                          label:
                                            description: The label for the Custom Field
                                            type: string
                                            examples:
                                              - My field X
                                          code:
                                            description: The unique code for the Custom Field
                                            type: string
                                            examples:
                                              - C01
                                          required:
                                            description: Specifies if the Custom Field is required
                                            type: boolean
                                            examples:
                                              - true
                                          are_values_readonly:
                                            description: >-
                                              Specifies if the Custom Field values are read only (so only integrations
                                              can set them).
                                            type: boolean
                                            examples:
                                              - false
                                          archived_at:
                                            description: >-
                                              Indicates when the custom field was archived for this object type. Objects
                                              that belong to the archived type will still display the custom field value
                                              if it was configured before the archiving.
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-03-12 12:12:12'
                                          type_settings:
                                            description: The type settings for the Custom Field
                                            type: object
                                            properties:
                                              allow_multiple_selection:
                                                description: Indicates if the Custom Field supports selecting multiple values
                                                type: boolean
                                                examples:
                                                  - true
                                              managed_by_integrations:
                                                description: Indicates if the Custom Field options are only managed by integrations
                                                type: boolean
                                                examples:
                                                  - true
                                  - type: object
                                    properties:
                                      id:
                                        description: The unique identifier for the Custom Field
                                        type: integer
                                        examples:
                                          - 123
                                      field_type:
                                        description: The type of the Custom Field
                                        type: string
                                        enum:
                                          - TEXT
                                        examples:
                                          - TEXT
                                      value:
                                        description: The current value of the Custom Field in this resource
                                        type:
                                          - string
                                          - 'null'
                                        examples:
                                          - abc
                                      configs:
                                        type: object
                                        properties:
                                          label:
                                            description: The label for the Custom Field
                                            type: string
                                            examples:
                                              - My field X
                                          code:
                                            description: The unique code for the Custom Field
                                            type: string
                                            examples:
                                              - C01
                                          required:
                                            description: Specifies if the Custom Field is required
                                            type: boolean
                                            examples:
                                              - true
                                          are_values_readonly:
                                            description: >-
                                              Specifies if the Custom Field values are read only (so only integrations
                                              can set them).
                                            type: boolean
                                            examples:
                                              - false
                                          archived_at:
                                            description: >-
                                              Indicates when the custom field was archived for this object type. Objects
                                              that belong to the archived type will still display the custom field value
                                              if it was configured before the archiving.
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-03-12 12:12:12'
                                          type_settings:
                                            description: >-
                                              The type settings for the Custom Field (Empty for Custom Fields of type
                                              TEXT)
                                            type: object
                                  - type: object
                                    properties:
                                      id:
                                        description: The unique identifier for the Custom Field
                                        type: integer
                                        examples:
                                          - 123
                                      field_type:
                                        description: The type of the Custom Field
                                        type: string
                                        enum:
                                          - BOOLEAN
                                        examples:
                                          - BOOLEAN
                                      value:
                                        description: The current value of the Custom Field in this resource
                                        type:
                                          - boolean
                                          - 'null'
                                        examples:
                                          - true
                                      configs:
                                        type: object
                                        properties:
                                          label:
                                            description: The label for the Custom Field
                                            type: string
                                            examples:
                                              - My field X
                                          code:
                                            description: The unique code for the Custom Field
                                            type: string
                                            examples:
                                              - C01
                                          required:
                                            description: Specifies if the Custom Field is required
                                            type: boolean
                                            examples:
                                              - true
                                          are_values_readonly:
                                            description: >-
                                              Specifies if the Custom Field values are read only (so only integrations
                                              can set them).
                                            type: boolean
                                            examples:
                                              - false
                                          archived_at:
                                            description: >-
                                              Indicates when the custom field was archived for this object type. Objects
                                              that belong to the archived type will still display the custom field value
                                              if it was configured before the archiving.
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-03-12 12:12:12'
                                          type_settings:
                                            description: >-
                                              The type settings for the Custom Field (There are none for the Custom
                                              Field Boolean type)
                                            type: object
                                  - type: object
                                    properties:
                                      id:
                                        description: The unique identifier for the Custom Field
                                        type: integer
                                        examples:
                                          - 123
                                      field_type:
                                        description: The type of the Custom Field
                                        type: string
                                        enum:
                                          - RELATIONSHIP
                                        examples:
                                          - RELATIONSHIP
                                      value:
                                        description: The current values of the Custom Field in this resource
                                        type:
                                          - array
                                          - 'null'
                                        items:
                                          type: object
                                          properties:
                                            related_to_type:
                                              description: The type of object that is selected as the Custom Field Values
                                              type: string
                                              enum:
                                                - CLIENT
                                                - CONTACT
                                              examples:
                                                - CLIENT
                                            related_to_id:
                                              description: The ID of object that is selected as the Custom Field Value
                                              type: integer
                                              examples:
                                                - 123
                                      configs:
                                        type: object
                                        properties:
                                          label:
                                            description: The label for the Custom Field
                                            type: string
                                            examples:
                                              - My field X
                                          code:
                                            description: The unique code for the Custom Field
                                            type: string
                                            examples:
                                              - C01
                                          required:
                                            description: Specifies if the Custom Field is required
                                            type: boolean
                                            examples:
                                              - true
                                          are_values_readonly:
                                            description: >-
                                              Specifies if the Custom Field values are read only (so only integrations
                                              can set them).
                                            type: boolean
                                            examples:
                                              - false
                                          archived_at:
                                            description: >-
                                              Indicates when the custom field was archived for this object type. Objects
                                              that belong to the archived type will still display the custom field value
                                              if it was configured before the archiving.
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-03-12 12:12:12'
                                          type_settings:
                                            description: The type settings for the Custom Field
                                            type: object
                                            properties:
                                              allow_multiple_selection:
                                                description: Indicates if the Custom Field allows multiple selection
                                                type: boolean
                                                examples:
                                                  - false
                                              relationship_object:
                                                description: The type of object that is selected as the Custom Field Values
                                                type: string
                                                enum:
                                                  - CLIENT
                                                  - CONTACT
                                                examples:
                                                  - CLIENT
                                  - type: object
                                    properties:
                                      id:
                                        description: The unique identifier for the Custom Field
                                        type: integer
                                        examples:
                                          - 123
                                      field_type:
                                        description: The type of the Custom Field
                                        type: string
                                        enum:
                                          - DATETIME
                                        examples:
                                          - DATETIME
                                      value:
                                        description: The current value of the Custom Field in this resource
                                        type:
                                          - string
                                          - 'null'
                                        format: date-time
                                        examples:
                                          - '2025-12-12 12:39:00'
                                      configs:
                                        type: object
                                        properties:
                                          label:
                                            description: The label for the Custom Field
                                            type: string
                                            examples:
                                              - My field X
                                          code:
                                            description: The unique code for the Custom Field
                                            type: string
                                            examples:
                                              - C01
                                          required:
                                            description: Specifies if the Custom Field is required
                                            type: boolean
                                            examples:
                                              - true
                                          are_values_readonly:
                                            description: >-
                                              Specifies if the Custom Field values are read only (so only integrations
                                              can set them).
                                            type: boolean
                                            examples:
                                              - false
                                          archived_at:
                                            description: >-
                                              Indicates when the custom field was archived for this object type. Objects
                                              that belong to the archived type will still display the custom field value
                                              if it was configured before the archiving.
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-03-12 12:12:12'
                                          type_settings:
                                            description: The type settings for the Custom Field
                                            type: object
                                            properties:
                                              allow_past_dates:
                                                description: Indicates if this Custom Field support past dates
                                                type: boolean
                                                examples:
                                                  - false
                                              allow_future_dates:
                                                description: Indicates if this Custom Field support future dates
                                                type: boolean
                                                examples:
                                                  - true
                                  - type: object
                                    properties:
                                      id:
                                        description: The unique identifier for the Custom Field
                                        type: integer
                                        examples:
                                          - 123
                                      field_type:
                                        description: The type of the Custom Field
                                        type: string
                                        enum:
                                          - NUMBER
                                        examples:
                                          - NUMBER
                                      value:
                                        description: The current value of the Custom Field in this resource
                                        type:
                                          - integer
                                          - 'null'
                                        examples:
                                          - 12
                                      configs:
                                        type: object
                                        properties:
                                          label:
                                            description: The label for the Custom Field
                                            type: string
                                            examples:
                                              - My field X
                                          code:
                                            description: The unique code for the Custom Field
                                            type: string
                                            examples:
                                              - C01
                                          required:
                                            description: Specifies if the Custom Field is required
                                            type: boolean
                                            examples:
                                              - true
                                          are_values_readonly:
                                            description: >-
                                              Specifies if the Custom Field values are read only (so only integrations
                                              can set them).
                                            type: boolean
                                            examples:
                                              - false
                                          archived_at:
                                            description: >-
                                              Indicates when the custom field was archived for this object type. Objects
                                              that belong to the archived type will still display the custom field value
                                              if it was configured before the archiving.
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-03-12 12:12:12'
                                          type_settings:
                                            description: The type settings for the Custom Field
                                            type: object
                                            properties:
                                              min:
                                                description: Indicates the minimum value for the Custom Field
                                                type:
                                                  - integer
                                                  - 'null'
                                                examples:
                                                  - 1
                                              max:
                                                description: Indicates the maximum value for the Custom Field
                                                type:
                                                  - integer
                                                  - 'null'
                                                examples:
                                                  - 3
                                discriminator:
                                  propertyName: field_type
                  included:
                    description: >
                      List of expanded relationships for the Sell Order (Sale).


                      Items available in this list will vary depending on the value supplied in `expanded` query
                      parameter.
                    type: array
                    items:
                      anyOf:
                        - title: Entity
                          description: Entity model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Supplier
                              type: string
                              examples:
                                - '1'
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - entity
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                entity_id:
                                  type: integer
                                name:
                                  type: string
                                email:
                                  type: string
                                site:
                                  type: string
                                phone:
                                  type: string
                                cellphone:
                                  type: string
                                address:
                                  type: string
                                nib:
                                  type: string
                                nif:
                                  type: string
                                report_email:
                                  type: string
                                language:
                                  type: string
                                currency:
                                  type: string
                                license:
                                  type: string
                                  enum:
                                    - ASSISTANCE
                                    - CHURNED
                                    - COMPLEX
                                    - CSENTITY
                                    - DISTRIBUTED
                                    - HOTEL
                                    - NONE
                                    - PARTNER
                                    - PLACECHECKUP
                                profile_picture:
                                  type: string
                                entity_uuid:
                                  type: string
                                vat_rate:
                                  type: number
                                colour:
                                  type: string
                        - title: Operator
                          description: Operator model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Operator
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - operator
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                operator_id:
                                  description: ID of the Operator
                                  type: integer
                                  readOnly: true
                                operator_uuid:
                                  description: Uuid of the Operator
                                  type: string
                                  format: uuid
                                  readOnly: true
                                full_name:
                                  type: string
                                email:
                                  type: string
                                  format: email
                                phone:
                                  type:
                                    - string
                                    - 'null'
                                cellphone:
                                  type:
                                    - string
                                    - 'null'
                                account:
                                  description: Type of account which determines the access permission level.
                                  type: string
                                  enum:
                                    - admin
                                    - manager
                                    - technician
                                    - operator
                                    - reporter
                                language:
                                  type: string
                                  enum:
                                    - ar
                                    - ca
                                    - da_dk
                                    - en
                                    - es
                                    - fr_fr
                                    - pl_pl
                                    - pt_br
                                    - pt_pt
                                    - ko
                                    - zh_cn
                                    - nl_nl
                                    - de_de
                                cost_per_hour:
                                  type: number
                                  minimum: 0
                                  examples:
                                    - 10
                                warehouse_id:
                                  description: ID of the warehouse associated to the Operator by default.
                                  type: integer
                                entity_id:
                                  type: integer
                                  readOnly: true
                                timezone:
                                  description: >
                                    Valid PHP timezone identifier. See the full list here:
                                    https://www.php.net/manual/en/timezones.php.
                                  type: string
                                  examples:
                                    - Europe/Lisbon
                                is_from_network:
                                  type: boolean
                                created_at:
                                  type: string
                                  format: date-time
                                phone_country_code:
                                  type: string
                                  examples:
                                    - US
                                is_first_web_login:
                                  type:
                                    - boolean
                                    - 'null'
                                  readOnly: true
                                status:
                                  type: string
                                  enum:
                                    - WORKING
                                    - AVAILABLE
                                    - OFFLINE
                                  examples:
                                    - WORKING
                            meta:
                              type: object
                              properties:
                                custom_fields:
                                  type:
                                    - object
                                    - 'null'
                                  additionalProperties:
                                    oneOf:
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - SELECT
                                            examples:
                                              - SELECT
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                option_id:
                                                  description: The ID of the selected option
                                                  type: integer
                                                  examples:
                                                    - 123
                                                option_code:
                                                  description: The code of the selected option
                                                  type:
                                                    - string
                                                    - 'null'
                                                  examples:
                                                    - OP01
                                                value:
                                                  description: The value of the selected option
                                                  type: string
                                                  examples:
                                                    - My Option 1
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field supports selecting multiple values
                                                    type: boolean
                                                    examples:
                                                      - true
                                                  managed_by_integrations:
                                                    description: >-
                                                      Indicates if the Custom Field options are only managed by
                                                      integrations
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - TEXT
                                            examples:
                                              - TEXT
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            examples:
                                              - abc
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (Empty for Custom Fields of
                                                  type TEXT)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - BOOLEAN
                                            examples:
                                              - BOOLEAN
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - boolean
                                              - 'null'
                                            examples:
                                              - true
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (There are none for the Custom
                                                  Field Boolean type)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - RELATIONSHIP
                                            examples:
                                              - RELATIONSHIP
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                related_to_type:
                                                  description: The type of object that is selected as the Custom Field Values
                                                  type: string
                                                  enum:
                                                    - CLIENT
                                                    - CONTACT
                                                  examples:
                                                    - CLIENT
                                                related_to_id:
                                                  description: The ID of object that is selected as the Custom Field Value
                                                  type: integer
                                                  examples:
                                                    - 123
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field allows multiple selection
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  relationship_object:
                                                    description: The type of object that is selected as the Custom Field Values
                                                    type: string
                                                    enum:
                                                      - CLIENT
                                                      - CONTACT
                                                    examples:
                                                      - CLIENT
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - DATETIME
                                            examples:
                                              - DATETIME
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-12-12 12:39:00'
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_past_dates:
                                                    description: Indicates if this Custom Field support past dates
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  allow_future_dates:
                                                    description: Indicates if this Custom Field support future dates
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - NUMBER
                                            examples:
                                              - NUMBER
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - integer
                                              - 'null'
                                            examples:
                                              - 12
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  min:
                                                    description: Indicates the minimum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 1
                                                  max:
                                                    description: Indicates the maximum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 3
                                    discriminator:
                                      propertyName: field_type
                        - title: Operator
                          description: Operator model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Operator
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - operator
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                operator_id:
                                  description: ID of the Operator
                                  type: integer
                                  readOnly: true
                                operator_uuid:
                                  description: Uuid of the Operator
                                  type: string
                                  format: uuid
                                  readOnly: true
                                full_name:
                                  type: string
                                email:
                                  type: string
                                  format: email
                                phone:
                                  type:
                                    - string
                                    - 'null'
                                cellphone:
                                  type:
                                    - string
                                    - 'null'
                                account:
                                  description: Type of account which determines the access permission level.
                                  type: string
                                  enum:
                                    - admin
                                    - manager
                                    - technician
                                    - operator
                                    - reporter
                                language:
                                  type: string
                                  enum:
                                    - ar
                                    - ca
                                    - da_dk
                                    - en
                                    - es
                                    - fr_fr
                                    - pl_pl
                                    - pt_br
                                    - pt_pt
                                    - ko
                                    - zh_cn
                                    - nl_nl
                                    - de_de
                                cost_per_hour:
                                  type: number
                                  minimum: 0
                                  examples:
                                    - 10
                                warehouse_id:
                                  description: ID of the warehouse associated to the Operator by default.
                                  type: integer
                                entity_id:
                                  type: integer
                                  readOnly: true
                                timezone:
                                  description: >
                                    Valid PHP timezone identifier. See the full list here:
                                    https://www.php.net/manual/en/timezones.php.
                                  type: string
                                  examples:
                                    - Europe/Lisbon
                                is_from_network:
                                  type: boolean
                                created_at:
                                  type: string
                                  format: date-time
                                phone_country_code:
                                  type: string
                                  examples:
                                    - US
                                is_first_web_login:
                                  type:
                                    - boolean
                                    - 'null'
                                  readOnly: true
                                status:
                                  type: string
                                  enum:
                                    - WORKING
                                    - AVAILABLE
                                    - OFFLINE
                                  examples:
                                    - WORKING
                            meta:
                              type: object
                              properties:
                                custom_fields:
                                  type:
                                    - object
                                    - 'null'
                                  additionalProperties:
                                    oneOf:
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - SELECT
                                            examples:
                                              - SELECT
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                option_id:
                                                  description: The ID of the selected option
                                                  type: integer
                                                  examples:
                                                    - 123
                                                option_code:
                                                  description: The code of the selected option
                                                  type:
                                                    - string
                                                    - 'null'
                                                  examples:
                                                    - OP01
                                                value:
                                                  description: The value of the selected option
                                                  type: string
                                                  examples:
                                                    - My Option 1
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field supports selecting multiple values
                                                    type: boolean
                                                    examples:
                                                      - true
                                                  managed_by_integrations:
                                                    description: >-
                                                      Indicates if the Custom Field options are only managed by
                                                      integrations
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - TEXT
                                            examples:
                                              - TEXT
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            examples:
                                              - abc
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (Empty for Custom Fields of
                                                  type TEXT)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - BOOLEAN
                                            examples:
                                              - BOOLEAN
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - boolean
                                              - 'null'
                                            examples:
                                              - true
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (There are none for the Custom
                                                  Field Boolean type)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - RELATIONSHIP
                                            examples:
                                              - RELATIONSHIP
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                related_to_type:
                                                  description: The type of object that is selected as the Custom Field Values
                                                  type: string
                                                  enum:
                                                    - CLIENT
                                                    - CONTACT
                                                  examples:
                                                    - CLIENT
                                                related_to_id:
                                                  description: The ID of object that is selected as the Custom Field Value
                                                  type: integer
                                                  examples:
                                                    - 123
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field allows multiple selection
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  relationship_object:
                                                    description: The type of object that is selected as the Custom Field Values
                                                    type: string
                                                    enum:
                                                      - CLIENT
                                                      - CONTACT
                                                    examples:
                                                      - CLIENT
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - DATETIME
                                            examples:
                                              - DATETIME
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-12-12 12:39:00'
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_past_dates:
                                                    description: Indicates if this Custom Field support past dates
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  allow_future_dates:
                                                    description: Indicates if this Custom Field support future dates
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - NUMBER
                                            examples:
                                              - NUMBER
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - integer
                                              - 'null'
                                            examples:
                                              - 12
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  min:
                                                    description: Indicates the minimum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 1
                                                  max:
                                                    description: Indicates the maximum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 3
                                    discriminator:
                                      propertyName: field_type
                        - title: Operator
                          description: Operator model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Operator
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - operator
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                operator_id:
                                  description: ID of the Operator
                                  type: integer
                                  readOnly: true
                                operator_uuid:
                                  description: Uuid of the Operator
                                  type: string
                                  format: uuid
                                  readOnly: true
                                full_name:
                                  type: string
                                email:
                                  type: string
                                  format: email
                                phone:
                                  type:
                                    - string
                                    - 'null'
                                cellphone:
                                  type:
                                    - string
                                    - 'null'
                                account:
                                  description: Type of account which determines the access permission level.
                                  type: string
                                  enum:
                                    - admin
                                    - manager
                                    - technician
                                    - operator
                                    - reporter
                                language:
                                  type: string
                                  enum:
                                    - ar
                                    - ca
                                    - da_dk
                                    - en
                                    - es
                                    - fr_fr
                                    - pl_pl
                                    - pt_br
                                    - pt_pt
                                    - ko
                                    - zh_cn
                                    - nl_nl
                                    - de_de
                                cost_per_hour:
                                  type: number
                                  minimum: 0
                                  examples:
                                    - 10
                                warehouse_id:
                                  description: ID of the warehouse associated to the Operator by default.
                                  type: integer
                                entity_id:
                                  type: integer
                                  readOnly: true
                                timezone:
                                  description: >
                                    Valid PHP timezone identifier. See the full list here:
                                    https://www.php.net/manual/en/timezones.php.
                                  type: string
                                  examples:
                                    - Europe/Lisbon
                                is_from_network:
                                  type: boolean
                                created_at:
                                  type: string
                                  format: date-time
                                phone_country_code:
                                  type: string
                                  examples:
                                    - US
                                is_first_web_login:
                                  type:
                                    - boolean
                                    - 'null'
                                  readOnly: true
                                status:
                                  type: string
                                  enum:
                                    - WORKING
                                    - AVAILABLE
                                    - OFFLINE
                                  examples:
                                    - WORKING
                            meta:
                              type: object
                              properties:
                                custom_fields:
                                  type:
                                    - object
                                    - 'null'
                                  additionalProperties:
                                    oneOf:
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - SELECT
                                            examples:
                                              - SELECT
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                option_id:
                                                  description: The ID of the selected option
                                                  type: integer
                                                  examples:
                                                    - 123
                                                option_code:
                                                  description: The code of the selected option
                                                  type:
                                                    - string
                                                    - 'null'
                                                  examples:
                                                    - OP01
                                                value:
                                                  description: The value of the selected option
                                                  type: string
                                                  examples:
                                                    - My Option 1
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field supports selecting multiple values
                                                    type: boolean
                                                    examples:
                                                      - true
                                                  managed_by_integrations:
                                                    description: >-
                                                      Indicates if the Custom Field options are only managed by
                                                      integrations
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - TEXT
                                            examples:
                                              - TEXT
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            examples:
                                              - abc
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (Empty for Custom Fields of
                                                  type TEXT)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - BOOLEAN
                                            examples:
                                              - BOOLEAN
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - boolean
                                              - 'null'
                                            examples:
                                              - true
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (There are none for the Custom
                                                  Field Boolean type)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - RELATIONSHIP
                                            examples:
                                              - RELATIONSHIP
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                related_to_type:
                                                  description: The type of object that is selected as the Custom Field Values
                                                  type: string
                                                  enum:
                                                    - CLIENT
                                                    - CONTACT
                                                  examples:
                                                    - CLIENT
                                                related_to_id:
                                                  description: The ID of object that is selected as the Custom Field Value
                                                  type: integer
                                                  examples:
                                                    - 123
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field allows multiple selection
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  relationship_object:
                                                    description: The type of object that is selected as the Custom Field Values
                                                    type: string
                                                    enum:
                                                      - CLIENT
                                                      - CONTACT
                                                    examples:
                                                      - CLIENT
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - DATETIME
                                            examples:
                                              - DATETIME
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-12-12 12:39:00'
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_past_dates:
                                                    description: Indicates if this Custom Field support past dates
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  allow_future_dates:
                                                    description: Indicates if this Custom Field support future dates
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - NUMBER
                                            examples:
                                              - NUMBER
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - integer
                                              - 'null'
                                            examples:
                                              - 12
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  min:
                                                    description: Indicates the minimum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 1
                                                  max:
                                                    description: Indicates the maximum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 3
                                    discriminator:
                                      propertyName: field_type
                        - title: Operator
                          description: Operator model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Operator
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - operator
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                operator_id:
                                  description: ID of the Operator
                                  type: integer
                                  readOnly: true
                                operator_uuid:
                                  description: Uuid of the Operator
                                  type: string
                                  format: uuid
                                  readOnly: true
                                full_name:
                                  type: string
                                email:
                                  type: string
                                  format: email
                                phone:
                                  type:
                                    - string
                                    - 'null'
                                cellphone:
                                  type:
                                    - string
                                    - 'null'
                                account:
                                  description: Type of account which determines the access permission level.
                                  type: string
                                  enum:
                                    - admin
                                    - manager
                                    - technician
                                    - operator
                                    - reporter
                                language:
                                  type: string
                                  enum:
                                    - ar
                                    - ca
                                    - da_dk
                                    - en
                                    - es
                                    - fr_fr
                                    - pl_pl
                                    - pt_br
                                    - pt_pt
                                    - ko
                                    - zh_cn
                                    - nl_nl
                                    - de_de
                                cost_per_hour:
                                  type: number
                                  minimum: 0
                                  examples:
                                    - 10
                                warehouse_id:
                                  description: ID of the warehouse associated to the Operator by default.
                                  type: integer
                                entity_id:
                                  type: integer
                                  readOnly: true
                                timezone:
                                  description: >
                                    Valid PHP timezone identifier. See the full list here:
                                    https://www.php.net/manual/en/timezones.php.
                                  type: string
                                  examples:
                                    - Europe/Lisbon
                                is_from_network:
                                  type: boolean
                                created_at:
                                  type: string
                                  format: date-time
                                phone_country_code:
                                  type: string
                                  examples:
                                    - US
                                is_first_web_login:
                                  type:
                                    - boolean
                                    - 'null'
                                  readOnly: true
                                status:
                                  type: string
                                  enum:
                                    - WORKING
                                    - AVAILABLE
                                    - OFFLINE
                                  examples:
                                    - WORKING
                            meta:
                              type: object
                              properties:
                                custom_fields:
                                  type:
                                    - object
                                    - 'null'
                                  additionalProperties:
                                    oneOf:
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - SELECT
                                            examples:
                                              - SELECT
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                option_id:
                                                  description: The ID of the selected option
                                                  type: integer
                                                  examples:
                                                    - 123
                                                option_code:
                                                  description: The code of the selected option
                                                  type:
                                                    - string
                                                    - 'null'
                                                  examples:
                                                    - OP01
                                                value:
                                                  description: The value of the selected option
                                                  type: string
                                                  examples:
                                                    - My Option 1
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field supports selecting multiple values
                                                    type: boolean
                                                    examples:
                                                      - true
                                                  managed_by_integrations:
                                                    description: >-
                                                      Indicates if the Custom Field options are only managed by
                                                      integrations
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - TEXT
                                            examples:
                                              - TEXT
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            examples:
                                              - abc
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (Empty for Custom Fields of
                                                  type TEXT)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - BOOLEAN
                                            examples:
                                              - BOOLEAN
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - boolean
                                              - 'null'
                                            examples:
                                              - true
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (There are none for the Custom
                                                  Field Boolean type)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - RELATIONSHIP
                                            examples:
                                              - RELATIONSHIP
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                related_to_type:
                                                  description: The type of object that is selected as the Custom Field Values
                                                  type: string
                                                  enum:
                                                    - CLIENT
                                                    - CONTACT
                                                  examples:
                                                    - CLIENT
                                                related_to_id:
                                                  description: The ID of object that is selected as the Custom Field Value
                                                  type: integer
                                                  examples:
                                                    - 123
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field allows multiple selection
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  relationship_object:
                                                    description: The type of object that is selected as the Custom Field Values
                                                    type: string
                                                    enum:
                                                      - CLIENT
                                                      - CONTACT
                                                    examples:
                                                      - CLIENT
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - DATETIME
                                            examples:
                                              - DATETIME
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-12-12 12:39:00'
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_past_dates:
                                                    description: Indicates if this Custom Field support past dates
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  allow_future_dates:
                                                    description: Indicates if this Custom Field support future dates
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - NUMBER
                                            examples:
                                              - NUMBER
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - integer
                                              - 'null'
                                            examples:
                                              - 12
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  min:
                                                    description: Indicates the minimum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 1
                                                  max:
                                                    description: Indicates the maximum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 3
                                    discriminator:
                                      propertyName: field_type
                        - title: Operator
                          description: Operator model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Operator
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - operator
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                operator_id:
                                  description: ID of the Operator
                                  type: integer
                                  readOnly: true
                                operator_uuid:
                                  description: Uuid of the Operator
                                  type: string
                                  format: uuid
                                  readOnly: true
                                full_name:
                                  type: string
                                email:
                                  type: string
                                  format: email
                                phone:
                                  type:
                                    - string
                                    - 'null'
                                cellphone:
                                  type:
                                    - string
                                    - 'null'
                                account:
                                  description: Type of account which determines the access permission level.
                                  type: string
                                  enum:
                                    - admin
                                    - manager
                                    - technician
                                    - operator
                                    - reporter
                                language:
                                  type: string
                                  enum:
                                    - ar
                                    - ca
                                    - da_dk
                                    - en
                                    - es
                                    - fr_fr
                                    - pl_pl
                                    - pt_br
                                    - pt_pt
                                    - ko
                                    - zh_cn
                                    - nl_nl
                                    - de_de
                                cost_per_hour:
                                  type: number
                                  minimum: 0
                                  examples:
                                    - 10
                                warehouse_id:
                                  description: ID of the warehouse associated to the Operator by default.
                                  type: integer
                                entity_id:
                                  type: integer
                                  readOnly: true
                                timezone:
                                  description: >
                                    Valid PHP timezone identifier. See the full list here:
                                    https://www.php.net/manual/en/timezones.php.
                                  type: string
                                  examples:
                                    - Europe/Lisbon
                                is_from_network:
                                  type: boolean
                                created_at:
                                  type: string
                                  format: date-time
                                phone_country_code:
                                  type: string
                                  examples:
                                    - US
                                is_first_web_login:
                                  type:
                                    - boolean
                                    - 'null'
                                  readOnly: true
                                status:
                                  type: string
                                  enum:
                                    - WORKING
                                    - AVAILABLE
                                    - OFFLINE
                                  examples:
                                    - WORKING
                            meta:
                              type: object
                              properties:
                                custom_fields:
                                  type:
                                    - object
                                    - 'null'
                                  additionalProperties:
                                    oneOf:
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - SELECT
                                            examples:
                                              - SELECT
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                option_id:
                                                  description: The ID of the selected option
                                                  type: integer
                                                  examples:
                                                    - 123
                                                option_code:
                                                  description: The code of the selected option
                                                  type:
                                                    - string
                                                    - 'null'
                                                  examples:
                                                    - OP01
                                                value:
                                                  description: The value of the selected option
                                                  type: string
                                                  examples:
                                                    - My Option 1
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field supports selecting multiple values
                                                    type: boolean
                                                    examples:
                                                      - true
                                                  managed_by_integrations:
                                                    description: >-
                                                      Indicates if the Custom Field options are only managed by
                                                      integrations
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - TEXT
                                            examples:
                                              - TEXT
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            examples:
                                              - abc
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (Empty for Custom Fields of
                                                  type TEXT)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - BOOLEAN
                                            examples:
                                              - BOOLEAN
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - boolean
                                              - 'null'
                                            examples:
                                              - true
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (There are none for the Custom
                                                  Field Boolean type)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - RELATIONSHIP
                                            examples:
                                              - RELATIONSHIP
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                related_to_type:
                                                  description: The type of object that is selected as the Custom Field Values
                                                  type: string
                                                  enum:
                                                    - CLIENT
                                                    - CONTACT
                                                  examples:
                                                    - CLIENT
                                                related_to_id:
                                                  description: The ID of object that is selected as the Custom Field Value
                                                  type: integer
                                                  examples:
                                                    - 123
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field allows multiple selection
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  relationship_object:
                                                    description: The type of object that is selected as the Custom Field Values
                                                    type: string
                                                    enum:
                                                      - CLIENT
                                                      - CONTACT
                                                    examples:
                                                      - CLIENT
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - DATETIME
                                            examples:
                                              - DATETIME
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-12-12 12:39:00'
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_past_dates:
                                                    description: Indicates if this Custom Field support past dates
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  allow_future_dates:
                                                    description: Indicates if this Custom Field support future dates
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - NUMBER
                                            examples:
                                              - NUMBER
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - integer
                                              - 'null'
                                            examples:
                                              - 12
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  min:
                                                    description: Indicates the minimum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 1
                                                  max:
                                                    description: Indicates the maximum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 3
                                    discriminator:
                                      propertyName: field_type
                        - title: Clients
                          description: Client model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Client
                              type: string
                              examples:
                                - '123'
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - client
                              examples:
                                - client
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                client_id:
                                  description: ID of the Client
                                  type: integer
                                  examples:
                                    - 123
                                client_uuid:
                                  description: UUID of the Client
                                  type: string
                                  format: uuid
                                  examples:
                                    - e632afe8-a1bf-4702-b5bd-b1163861ba51
                                name:
                                  description: Client Name
                                  type: string
                                  examples:
                                    - John Doe
                                code:
                                  description: Client Code
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - JD
                                nif:
                                  description: NIF/ VAT Number of the Client
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - '1234566789'
                                postal_code:
                                  description: Postal Code of the Client
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - 1234-567
                                city:
                                  description: City of the Client
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - Lisbon
                                observations:
                                  description: Additional information
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - abc
                                address:
                                  description: Address of the Client
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - abc
                                country:
                                  description: Country of the Client
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - PT
                                created_at:
                                  description: The datetime of the creation of the Client
                                  type: string
                                  format: date-time
                                  examples:
                                    - '2020-12-03T12:45:00'
                                  readOnly: true
                                updated_at:
                                  description: The datetime of the last update of the Client
                                  type: string
                                  format: date-time
                                  examples:
                                    - '2020-12-03T12:45:00'
                                  readOnly: true
                                has_handshake:
                                  description: Indicates if this Client is "connected" to work on Infraspeak Network.
                                  type: boolean
                                  examples:
                                    - true
                                my_company:
                                  description: Indicates whether it is the entity's default client
                                  type: boolean
                                  examples:
                                    - true
                            relationships:
                              description: The relationships of the Client (Only present when expanded in the request)
                              type: object
                              properties:
                                buildings:
                                  description: The Buildings associated to the Client
                                  type: object
                                contacts:
                                  description: The Contacts associated to the Client
                                  type: object
                                files:
                                  description: The Files associated to the Client
                                  type: object
                                profilePicture:
                                  description: The profile picture of the the Client
                                  type: object
                                operators:
                                  description: The Operators associated to the Client
                                  type: object
                                handshake:
                                  description: The Handshake associated to the Client
                                  type: object
                          required:
                            - id
                            - type
                            - attributes
                        - title: Contact
                          description: Contact model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Contact
                              type: string
                              readOnly: true
                              examples:
                                - '123'
                            type:
                              description: Model type
                              type: string
                              enum:
                                - contact
                              readOnly: true
                              examples:
                                - contact
                            attributes:
                              type: object
                              properties:
                                contact_id:
                                  description: ID of the Contact
                                  type: integer
                                  readOnly: true
                                  examples:
                                    - 123
                                entity_id:
                                  description: ID of the Entity
                                  type: integer
                                  readOnly: true
                                  examples:
                                    - 123
                                cellphone:
                                  description: The cellphone number of the Contact
                                  type: string
                                  examples:
                                    - '123456789'
                                language:
                                  description: The language of the Contact
                                  type: string
                                  examples:
                                    - pt_br
                                email:
                                  description: The email of the Contact
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - foo@bar.com
                                full_name:
                                  description: The full name of the Contact
                                  type: string
                                  examples:
                                    - Jose Pinhal
                                phone:
                                  description: The phone number of the Contact
                                  type: string
                                  examples:
                                    - '123456789'
                                is_direct_user:
                                  description: Indicates whether the contact is a Direct user
                                  type: boolean
                                  examples:
                                    - false
                                has_access:
                                  description: Indicates whether the contact has access to Direct
                                  oneOf:
                                    - type: boolean
                                    - type: integer
                                      enum:
                                        - 0
                                        - 1
                                  examples:
                                    - false
                            relationships:
                              description: The relationships of the Contact
                              type: object
                              properties:
                                suppliers:
                                  description: The Suppliers associated to the Contact
                                  type: object
                                clients:
                                  description: The Clients associated to the Contact
                                  type: object
                                extensionsPermissions:
                                  description: The Extensions Permissions associated to the Contact
                                  type: object
                                locals:
                                  description: The Locations associated to the Contact
                                  type: object
                                profilePicture:
                                  description: The profile picture of the Contact
                                  type: object
                                user:
                                  description: The user associated to the Contact
                                  type: object
                            meta:
                              type: object
                              properties:
                                custom_fields:
                                  type:
                                    - object
                                    - 'null'
                                  additionalProperties:
                                    oneOf:
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - SELECT
                                            examples:
                                              - SELECT
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                option_id:
                                                  description: The ID of the selected option
                                                  type: integer
                                                  examples:
                                                    - 123
                                                option_code:
                                                  description: The code of the selected option
                                                  type:
                                                    - string
                                                    - 'null'
                                                  examples:
                                                    - OP01
                                                value:
                                                  description: The value of the selected option
                                                  type: string
                                                  examples:
                                                    - My Option 1
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field supports selecting multiple values
                                                    type: boolean
                                                    examples:
                                                      - true
                                                  managed_by_integrations:
                                                    description: >-
                                                      Indicates if the Custom Field options are only managed by
                                                      integrations
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - TEXT
                                            examples:
                                              - TEXT
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            examples:
                                              - abc
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (Empty for Custom Fields of
                                                  type TEXT)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - BOOLEAN
                                            examples:
                                              - BOOLEAN
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - boolean
                                              - 'null'
                                            examples:
                                              - true
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (There are none for the Custom
                                                  Field Boolean type)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - RELATIONSHIP
                                            examples:
                                              - RELATIONSHIP
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                related_to_type:
                                                  description: The type of object that is selected as the Custom Field Values
                                                  type: string
                                                  enum:
                                                    - CLIENT
                                                    - CONTACT
                                                  examples:
                                                    - CLIENT
                                                related_to_id:
                                                  description: The ID of object that is selected as the Custom Field Value
                                                  type: integer
                                                  examples:
                                                    - 123
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field allows multiple selection
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  relationship_object:
                                                    description: The type of object that is selected as the Custom Field Values
                                                    type: string
                                                    enum:
                                                      - CLIENT
                                                      - CONTACT
                                                    examples:
                                                      - CLIENT
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - DATETIME
                                            examples:
                                              - DATETIME
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-12-12 12:39:00'
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_past_dates:
                                                    description: Indicates if this Custom Field support past dates
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  allow_future_dates:
                                                    description: Indicates if this Custom Field support future dates
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - NUMBER
                                            examples:
                                              - NUMBER
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - integer
                                              - 'null'
                                            examples:
                                              - 12
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  min:
                                                    description: Indicates the minimum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 1
                                                  max:
                                                    description: Indicates the maximum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 3
                                    discriminator:
                                      propertyName: field_type
                          required:
                            - id
                            - type
                            - attributes
                        - title: Failure
                          description: Failure model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Failure
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - failure
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                failure_id:
                                  description: ID of the Failure
                                  type: integer
                                  readOnly: true
                                  examples:
                                    - 1
                                uuid:
                                  description: Universally Unique Identifier for the Failure
                                  type: string
                                  format: uuid
                                  readOnly: true
                                problem_id:
                                  description: ID of the associated problem
                                  type: integer
                                status:
                                  type: string
                                  enum:
                                    - WAITING_APPROVAL
                                    - WAITING_RESOLUTION
                                    - IN_RESOLUTION
                                    - PAUSED
                                    - COMPLETED
                                    - ARCHIVED
                                  readOnly: true
                                start_date:
                                  type: string
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T08:48:00.000Z'
                                completed_date:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T17:12:00.000Z'
                                approved_date:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T09:30:00.000Z'
                                paused_date:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T13:05:00.000Z'
                                description:
                                  type: string
                                  examples:
                                    - Needs replacement
                                last_status_description:
                                  type: string
                                  examples:
                                    - Completed
                                observations:
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - Needs a new part
                                code:
                                  type: string
                                  examples:
                                    - WO2022
                                fts_vector:
                                  description: Denormalized data of a Failure
                                  type: string
                                priority:
                                  description: Failure priority number being 1 the lowest priority and 4 the highest priority.
                                  type: integer
                                  enum:
                                    - 1
                                    - 2
                                    - 3
                                    - 4
                                client_id:
                                  description: ID of the associated client defined according to the respective `local_id`.
                                  type: integer
                                  readOnly: true
                                entity_id:
                                  description: ID of the Entity of the Failure
                                  type: integer
                                  readOnly: true
                                metering_registry_id:
                                  description: ID of a possible associated metering registry
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                local_id:
                                  description: ID of the location associated to the Failure
                                  type: integer
                                paused_reason_id:
                                  description: ID of the paused reason associated to the Failure
                                  type: integer
                                external_id:
                                  description: External ID to be associated to the Failure
                                  type:
                                    - string
                                    - 'null'
                                report_name:
                                  description: Name of who reported the Failure
                                  type: string
                                solved:
                                  description: Indicates whether the Failure was closed successfully or not
                                  type: boolean
                                  readOnly: true
                                  default: false
                                confirmed:
                                  description: Indicates whether the Failure is confirmed or not
                                  type: boolean
                                  readOnly: true
                                  default: false
                                started:
                                  description: Indicates whether the Failure is started or not
                                  type: boolean
                                  readOnly: true
                                  default: false
                                paused:
                                  description: Indicates whether the Failure is paused or not
                                  type: boolean
                                  readOnly: true
                                  default: false
                                completed:
                                  description: Indicates whether the Failure is completed or not
                                  type: boolean
                                  readOnly: true
                                  default: false
                                archived:
                                  description: Indicates whether the Failure is archived or not
                                  type: boolean
                                  readOnly: true
                                  default: false
                                approved:
                                  description: Indicates whether the Failure is approved or not
                                  type: boolean
                                  readOnly: true
                                  default: false
                                next_schedule:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-29T10:30:00.000Z'
                                message_count:
                                  type: integer
                                  minimum: 0
                                  default: 0
                                  examples:
                                    - 3
                                time_statistics:
                                  type: object
                                  properties:
                                    approved_date:
                                      type:
                                        - string
                                        - 'null'
                                      format: date-time
                                      readOnly: true
                                      examples:
                                        - '2020-08-28T09:30:00.000Z'
                                    last_completed_date:
                                      type:
                                        - string
                                        - 'null'
                                      format: date-time
                                      readOnly: true
                                      examples:
                                        - '2020-08-28T17:12:00.000Z'
                                    last_paused_date:
                                      type:
                                        - string
                                        - 'null'
                                      format: date-time
                                      readOnly: true
                                      examples:
                                        - '2020-08-28T13:05:00.000Z'
                                    started_date:
                                      type:
                                        - string
                                        - 'null'
                                      format: date-time
                                      readOnly: true
                                      examples:
                                        - '2020-08-28T09:45:00.000Z'
                                    time_to_approve:
                                      description: Duration it took to approve the Failure since reported in `ISO8601` format.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - P0Y0M0DT0H42M0S
                                    time_to_complete:
                                      description: Duration it took to complete the Failure since reported in `ISO8601` format.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - P0Y0M0DT8H24M0S
                                    time_to_complete_after_started:
                                      description: >-
                                        Duration it took to complete the Failure since the resolution started in
                                        `ISO8601` format.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - P0Y0M0DT7H27M0S
                                    time_to_start:
                                      description: >-
                                        Duration it took to start the Failure's resolution since reported in `ISO8601`
                                        format.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - P0Y0M0DT0H57M0S
                                    time_to_start_after_approved:
                                      description: >-
                                        Duration it took to start the Failure's resolution since approved in `ISO8601`
                                        format.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - P0Y0M0DT0H15M0S
                                    real_duration:
                                      description: Real duration of the Failure's resolution time in `ISO8601` format.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - P0Y0M0DT7H27M0S
                                supplier_id:
                                  description: ID of the supplier associated to the Failure
                                  type: integer
                                signature_status:
                                  description: Indicates whether the Failure is signed or not
                                  type: string
                                  enum:
                                    - SIGNED
                                    - NOT_SIGNED
                                  default: NOT_SIGNED
                                last_status_change_date:
                                  type: string
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T09:30:00.000Z'
                                approved_by_id:
                                  description: ID of the operator who approved the Failure.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                completed_by_id:
                                  description: ID of the operator who completed the Failure.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                started_by_id:
                                  description: ID of the operator who started the Failure's resolution.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                paused_by_id:
                                  description: ID of the operator who paused the Failure's resolution.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                approved_by:
                                  description: Name of the operator who approved the Failure.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                completed_by:
                                  description: Name of the operator who completed the Failure.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                started_by:
                                  description: Name of the operator who started the Failure's resolution.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                paused_by:
                                  description: Name of the operator who paused the Failure's resolution.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                reported_by:
                                  description: Name of the operator who reported the Failure.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                manpower_duration:
                                  description: Duration of the Failure's manpower time in `ISO8601` format.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                  examples:
                                    - P0Y0M0DT7H27M0S
                                cost_center_id:
                                  description: ID of the cost center associated to the Failure
                                  type:
                                    - integer
                                    - 'null'
                                network_failure_id:
                                  description: ID of the Network Failure
                                  type: integer
                                  readOnly: true
                                  examples:
                                    - 1
                                created_at:
                                  type: string
                                  format: date-time
                                  readOnly: true
                                updated_at:
                                  type: string
                                  format: date-time
                                  readOnly: true
                                date_deleted:
                                  type: string
                                  format: date-time
                                  readOnly: true
                            relationships:
                              type: object
                              properties:
                                approvedBy:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                completedBy:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                createdBy:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                files:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - file
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                location:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - location
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                operator:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                          required:
                            - id
                            - type
                            - attributes
                        - title: File
                          description: File model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the File
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - file
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                file_id:
                                  description: File Id
                                  type: integer
                                  readOnly: true
                                file_uuid:
                                  description: File UUID
                                  type: string
                                  readOnly: true
                                related_to:
                                  description: Object which the File is related to
                                  type: string
                                  enum:
                                    - BUILDING
                                    - CATEGORY
                                    - CLIENT
                                    - ELEMENT
                                    - ELEMENT_REGISTRY
                                    - FAILURE
                                    - METERING_REGISTRY
                                    - OPERATOR
                                    - ORDER
                                    - QUOTE
                                    - QUOTE_REQUEST
                                    - RECEIVED_QUOTE
                                    - RECEIVED_QUOTE_REQUEST
                                    - REQUEST
                                    - SELL_ORDER
                                    - SUPPLIER
                                    - SCHEDULE_WORK
                                    - WORK
                                    - SCHEDULED_WORK
                                    - PURCHASE
                                    - PURCHASE_MATERIAL_LINE
                                    - PURCHASE_SERVICE_LINE
                                    - SALE
                                related_to_id:
                                  description: Relations Id
                                  type: integer
                                related_type:
                                  description: Object which the File is related to
                                  type: string
                                  enum:
                                    - BUILDING
                                    - CATEGORY
                                    - CLIENT
                                    - ELEMENT
                                    - ELEMENT_REGISTRY
                                    - FAILURE
                                    - METERING_REGISTRY
                                    - OPERATOR
                                    - ORDER
                                    - QUOTE
                                    - QUOTE_REQUEST
                                    - RECEIVED_QUOTE
                                    - RECEIVED_QUOTE_REQUEST
                                    - REQUEST
                                    - SELL_ORDER
                                    - SUPPLIER
                                    - SCHEDULE_WORK
                                    - WORK
                                  readOnly: true
                                file_label_id:
                                  description: File Label Id
                                  type:
                                    - integer
                                    - 'null'
                                name:
                                  description: File name
                                  type: string
                                  examples:
                                    - my_example_file
                                thumb:
                                  description: URL to the thumbnail, in case the File is an image.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                file_url:
                                  description: URL to the File
                                  type: string
                                  format: uri
                                  readOnly: true
                                description:
                                  type:
                                    - string
                                    - 'null'
                                expire_date:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T17:12:00.000Z'
                                has_reminder:
                                  type: boolean
                                  readOnly: true
                                file_type:
                                  description: Internal type of the file
                                  type: string
                                  enum:
                                    - cad
                                    - compressed
                                    - file
                                    - image
                                    - office
                                    - other
                                    - pdf
                                    - signature
                                    - video
                                  readOnly: true
                                permission_to_technician:
                                  type: boolean
                                  default: true
                                permission_to_manager:
                                  type: boolean
                                  default: true
                                permission_to_direct:
                                  type: boolean
                                  default: false
                                extension:
                                  type: string
                                  enum:
                                    - 3gp
                                    - 3gpp
                                    - bin
                                    - bmp
                                    - cad
                                    - csv
                                    - doc
                                    - docx
                                    - gif
                                    - jpeg
                                    - jpg
                                    - kmz
                                    - mov
                                    - mp4
                                    - odf
                                    - odp
                                    - pdf
                                    - png
                                    - ppt
                                    - pptx
                                    - qt
                                    - rar
                                    - txt
                                    - xls
                                    - xlsx
                                    - zip
                                  readOnly: true
                                network_status:
                                  description: Show the network status of the file.
                                  type: string
                                  enum:
                                    - SHARED
                                    - RECEIVED
                                    - NOT_SHARED
                                shared_with_supplier:
                                  description: Show if the file is currently in a shared status with the supplier.
                                  type: boolean
                                shared_with_client:
                                  description: Show if the file is currently in a shared status with the client.
                                  type: boolean
                                file_size:
                                  type: integer
                                  readOnly: true
                                created_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                  readOnly: true
                          required:
                            - id
                            - type
                            - attributes
                        - title: Quote
                          description: Quote model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Quote.
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - quote
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                quote_id:
                                  description: ID of the Quote.
                                  type: integer
                                  readOnly: true
                                quote_uuid:
                                  description: UUID of the Quote.
                                  type:
                                    - string
                                    - 'null'
                                  format: uuid
                                  readOnly: true
                                code:
                                  description: Code of the Quote. Visible on Infraspeak platform.
                                  type: integer
                                  readOnly: true
                                client_id:
                                  description: ID of the Client associated to the quote.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                state:
                                  description: State of the Quote.
                                  type: string
                                  enum:
                                    - DRAFT
                                    - READY
                                    - ACCEPTED
                                    - DECLINED
                                    - CANCELLED
                                    - CONVERTED_TO_SALE
                                  default: DRAFT
                                  examples:
                                    - DRAFT
                                entity_id:
                                  type: integer
                                  readOnly: true
                                created_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: Creation date of the Quote
                                      readOnly: true
                                created_by:
                                  description: ID of the operator that created the Quote.
                                  type: integer
                                  readOnly: true
                                started_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: Date when Quote has started.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                started_by:
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                ready_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: Date Quote is marked as Awaiting.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                ready_by_id:
                                  description: ID of the user who marked the quote as Awaiting.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                ready_by_type:
                                  description: Type of user who marked the Quote as Awaiting.
                                  type:
                                    - string
                                    - 'null'
                                  enum:
                                    - OPERATOR
                                    - CONTACT
                                    - null
                                  default: OPERATOR
                                accepted_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: Date Quote is accepted.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                accepted_by_id:
                                  description: ID of the user who accepted the Quote.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                accepted_by_type:
                                  description: Type of user who accepted the Quote.
                                  type:
                                    - string
                                    - 'null'
                                  enum:
                                    - OPERATOR
                                    - CONTACT
                                    - null
                                  default: OPERATOR
                                declined_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: Date Quote was declined.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                declined_by_id:
                                  description: ID of the user who declined the quote.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                declined_by_type:
                                  description: Type of user who declined the Quote.
                                  type:
                                    - string
                                    - 'null'
                                  enum:
                                    - OPERATOR
                                    - CONTACT
                                    - null
                                  default: OPERATOR
                                cancelled_by:
                                  description: ID of the user who cancelled the quote.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                cancelled_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: Date Quote was cancelled.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                last_sent_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: Date Quote was last sent.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                last_sent_by:
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                last_share_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: Date Quote was last shared.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                last_share_by:
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                converted_by:
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                converted_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: Date Quote was converted.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                description:
                                  description: Quote observations.
                                  type:
                                    - string
                                    - 'null'
                                internal_quote_id:
                                  description: Internal ID of the Quote.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                  examples:
                                    - FS-123
                                external_quote_id:
                                  description: External ID of the Quote.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                  examples:
                                    - FS-123
                                related_to_type:
                                  description: Type of object related to the quote.
                                  type:
                                    - string
                                    - 'null'
                                  enum:
                                    - FAILURE
                                    - SCHEDULED_WORK
                                    - null
                                  examples:
                                    - FAILURE
                                related_to_id:
                                  description: ID of the object (failure or scheduled work) related to the quote.
                                  type:
                                    - integer
                                    - 'null'
                                base_total:
                                  description: Total Base value of the Quote, without VAT and discount.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                discount_total:
                                  description: Total value of the discount applied to the Quote items.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                vat_total:
                                  description: Total value of the VAT applied to the Quote items.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                total:
                                  description: Total value of the Quote, considering the discount and VAT applied.
                                  type: integer
                                  readOnly: true
                                sell_order_id:
                                  description: ID of the Sale associated to the Quote, after converted.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                updated_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: Date Quote was updated.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                deleted_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: Date Quote was deleted.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                quote_request_id:
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                received_quote_request_id:
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                is_from_network:
                                  type: boolean
                                  readOnly: true
                                client_answer:
                                  type: object
                                  properties:
                                    clientUserName:
                                      type: string
                                    clientName:
                                      type: string
                                    answer:
                                      type: string
                            meta:
                              type: object
                              properties:
                                custom_fields:
                                  type:
                                    - object
                                    - 'null'
                                  additionalProperties:
                                    oneOf:
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - SELECT
                                            examples:
                                              - SELECT
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                option_id:
                                                  description: The ID of the selected option
                                                  type: integer
                                                  examples:
                                                    - 123
                                                option_code:
                                                  description: The code of the selected option
                                                  type:
                                                    - string
                                                    - 'null'
                                                  examples:
                                                    - OP01
                                                value:
                                                  description: The value of the selected option
                                                  type: string
                                                  examples:
                                                    - My Option 1
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field supports selecting multiple values
                                                    type: boolean
                                                    examples:
                                                      - true
                                                  managed_by_integrations:
                                                    description: >-
                                                      Indicates if the Custom Field options are only managed by
                                                      integrations
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - TEXT
                                            examples:
                                              - TEXT
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            examples:
                                              - abc
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (Empty for Custom Fields of
                                                  type TEXT)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - BOOLEAN
                                            examples:
                                              - BOOLEAN
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - boolean
                                              - 'null'
                                            examples:
                                              - true
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (There are none for the Custom
                                                  Field Boolean type)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - RELATIONSHIP
                                            examples:
                                              - RELATIONSHIP
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                related_to_type:
                                                  description: The type of object that is selected as the Custom Field Values
                                                  type: string
                                                  enum:
                                                    - CLIENT
                                                    - CONTACT
                                                  examples:
                                                    - CLIENT
                                                related_to_id:
                                                  description: The ID of object that is selected as the Custom Field Value
                                                  type: integer
                                                  examples:
                                                    - 123
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field allows multiple selection
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  relationship_object:
                                                    description: The type of object that is selected as the Custom Field Values
                                                    type: string
                                                    enum:
                                                      - CLIENT
                                                      - CONTACT
                                                    examples:
                                                      - CLIENT
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - DATETIME
                                            examples:
                                              - DATETIME
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-12-12 12:39:00'
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_past_dates:
                                                    description: Indicates if this Custom Field support past dates
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  allow_future_dates:
                                                    description: Indicates if this Custom Field support future dates
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - NUMBER
                                            examples:
                                              - NUMBER
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - integer
                                              - 'null'
                                            examples:
                                              - 12
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  min:
                                                    description: Indicates the minimum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 1
                                                  max:
                                                    description: Indicates the maximum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 3
                                    discriminator:
                                      propertyName: field_type
                        - title: Scheduled Work
                          description: Scheduled Order model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Scheduled Order
                              type: string
                              readOnly: true
                              examples:
                                - '123'
                            type:
                              description: Model type
                              type: string
                              enum:
                                - scheduled_work
                              readOnly: true
                              examples:
                                - scheduled_work
                            attributes:
                              type: object
                              properties:
                                entity_id:
                                  description: The ID of the Entity where the Scheduled Work belongs.
                                  type: integer
                                  examples:
                                    - 123
                                complete_date:
                                  description: The datetime when the Scheduled Work was completed
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  examples:
                                    - '2014-09-01 02:22:00'
                                cost_center_name:
                                  description: The name of the Cost Center associated with the Scheduled Work.
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - abc
                                completed_by_id:
                                  description: The ID of the Operator that completed the Scheduled Work.
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 123
                                completed_percentage:
                                  description: The percentage of the Scheduled Work that is completed.
                                  type: integer
                                  examples:
                                    - 45
                                completed_date:
                                  description: The datetime when the Scheduled Work was completed
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  examples:
                                    - '2014-09-01 02:22:00'
                                confirmed:
                                  description: Indicates if the Scheduled Work is confirmed.
                                  type: boolean
                                  examples:
                                    - true
                                failure_id:
                                  description: >-
                                    The ID of the Failure / Work Order associated with the Scheduled Work (Only if the
                                    Scheduled work originated from a Failure / Work Order)
                                  type:
                                    - integer
                                    - 'null'
                                last_status_change_date:
                                  description: The datetime when the Scheduled Work status changed for the last time
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  examples:
                                    - '2014-09-01 02:22:00'
                                last_status_change_operator:
                                  description: The name of the Operator that changed the Scheduled Work status for the last time
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - John
                                manpower_duration:
                                  description: The total manpower duration of the Scheduled work in ISO-8601 duration format.
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - P0Y0M0DT0H1M19S
                                manpower_cost:
                                  description: The total manpower cost of the Scheduled work in the currency of the logged in user.
                                  type:
                                    - number
                                    - 'null'
                                  examples:
                                    - 12.5
                                observation:
                                  description: Observations added to the Scheduled Work.
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - abc
                                real_start_date:
                                  description: >-
                                    The datetime when the Scheduled Work was actually started (not to confuse with the
                                    datetime when the Scheduled work planned to start)
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  examples:
                                    - '2014-09-01 02:22:00'
                                running:
                                  description: Indicates if the Scheduled Work is currently in a running status
                                  type: boolean
                                  examples:
                                    - true
                                schedule_work_id:
                                  description: The ID of the Scheduled Work
                                  type: integer
                                  examples:
                                    - 123
                                signature_status:
                                  description: Indicates if the Scheduled Work is signed by a responsible.
                                  type: string
                                  enum:
                                    - NOT_SIGNED
                                    - SIGNED
                                  examples:
                                    - NOT_SIGNED
                                start_date:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: The datetime when the Scheduled Work is/was planned to start
                                started_by_id:
                                  description: The ID of the Operator that started the Scheduled Work.
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 123
                                state:
                                  description: The current state of the Scheduled Work.
                                  type: string
                                  enum:
                                    - SCHEDULED
                                    - RUNNING
                                    - PAUSED
                                    - COMPLETED
                                    - CANCELED
                                    - ARCHIVED
                                    - COMPLETED_CANCELED
                                  examples:
                                    - COMPLETED
                                time_running:
                                  description: The current running duration of the Scheduled work in ISO-8601 duration format.
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - P0Y0M0DT0H1M19S
                                visit:
                                  description: >-
                                    Indicates the position/step of the Scheduled work in the parent Work / Planned Job
                                    that is originates from (e.g. can be the first Scheduled Work of the Work / Planned
                                    Job, the second, and so on)
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 1
                                work_id:
                                  description: The ID of the parent Work / Planned Job
                                  type: integer
                                  examples:
                                    - 123
                                next_sla_date:
                                  description: >
                                    The datetime of the closest SLA that is still ongoing in the Scheduled Work

                                    (This field includes only SLAs that have not finished yet and are still ongoing, and
                                    will be null if there's none)
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  examples:
                                    - '2014-09-01 02:22:00'
                                next_sla_percentage:
                                  description: >
                                    The percentage of the Scheduled Work tasks that are completed in the closest SLA
                                    that is still ongoing

                                    (This field includes only SLAs that have not finished yet and are still ongoing, and
                                    will be null if there's none)
                                  type:
                                    - number
                                    - 'null'
                                  examples:
                                    - 75.5
                                next_scheduled_work_sla_id:
                                  description: >
                                    The ID of the next SLA

                                    (This field includes the next SLA, despite his current status being already finished
                                    or paused)
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 123
                                next_scheduled_work_sla_date:
                                  description: >
                                    The datetime of the next SLA

                                    (This field includes the next SLA, despite his current status being already finished
                                    or paused)
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  examples:
                                    - '2014-09-01 02:22:00'
                                next_scheduled_work_sla_status_order:
                                  description: >
                                    The status order of the next SLA

                                    (0 if status is 'RUNNING', 1 if status is 'PAUSED', 2 if status is 'FINISHED',
                                    otherwise 3)

                                    (This field includes the next SLA, despite his current status being already finished
                                    or paused)
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 0
                                rescheduled_by_user:
                                  description: Indicates if the Scheduled Work was manually rescheduled by an User
                                  type: boolean
                                  examples:
                                    - false
                                network_id:
                                  description: ID used to reference a shared Planned Job Order
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 123
                                updated_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: The datetime of the last update in the Scheduled Work
                                display_start_date:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: The start datetime to display in the Scheduled Work
                                      type:
                                        - string
                                        - 'null'
                                display_complete_date:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: The complete datetime to display in the Scheduled Work
                                      type:
                                        - string
                                        - 'null'
                                estimated_duration_absolute_deviation:
                                  description: >-
                                    The absolute deviation between the actual manpower duration and the estimated task
                                    time in the Scheduled Work, representing the total difference regardless of whether
                                    the estimate was over or under
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 150
                                estimated_duration_relative_deviation:
                                  description: >-
                                    The relative deviation between the actual manpower duration and the estimated task
                                    time in the Scheduled Work. A negative value indicates the estimate was too low,
                                    while a positive value indicates it was too high
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - -150
                                pause_reason_id:
                                  description: The ID of the Pause Reason associated with the Scheduled Work
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 123
                                last_status_description:
                                  description: A description provided when the last status change occurred on the Scheduled Work
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - Waiting for spare parts delivery
                            relationships:
                              description: The relationships of the Scheduled Work (Only present when expanded in the request)
                              type: object
                              properties:
                                auditStats:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - audit_stats
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                buyOrders:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - buy_order
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                client:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - client
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                completedBy:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                elementRegistries:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - element_registry
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                entity:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - entity
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                events:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - event
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                eventsPlanned:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - event
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                files:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - file
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                gatekeeperAnswerRegistries:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - gatekeeper_answer_registry
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                networkStatus:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            description: >-
                                              If RECEIVER the Scheduled Work was received on Network, if SENDER the
                                              Scheduled Work was sent to the Network.
                                            type: string
                                            enum:
                                              - SENDER
                                              - RECEIVER
                                            readOnly: true
                                          action:
                                            description: >-
                                              If UNSHARED, the Scheduled Work was unshared from Network, if null, no
                                              action was taken.
                                            type: string
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                          in_sync:
                                            description: If the Scheduled Work is in sync of execution with the Network.
                                            type: boolean
                                            readOnly: true
                                          network_entity_uuid:
                                            description: >-
                                              The UUID of the Network Entity related to the Scheduled Work network
                                              status.
                                            type: string
                                            readOnly: true
                                          network_relation_id:
                                            description: >-
                                              The ID of the Network Relation related to the Scheduled Work network
                                              status. It can be from a Client or a Supplier.
                                            type: integer
                                            readOnly: true
                                          network_relation_type:
                                            description: >-
                                              The type of Network Relation related to the Scheduled Work network status.
                                              It can be from a Client or a Supplier, used to identify the relation ID
                                              and the relation the Network Entity has to the Scheduled Work.
                                            type: string
                                            enum:
                                              - CLIENT
                                              - SUPPLIER
                                            readOnly: true
                                          shared:
                                            description: If the Scheduled Work is actively shared on Network.
                                            type: boolean
                                            readOnly: true
                                otherCosts:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - other-cost
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                participants:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - operator
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                pausedBy:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                reminderRules:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - reminder_rules
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                reminders:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - reminder
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                requests:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - request
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                scheduledWorkSlas:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - schedule_work_sla
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                startedBy:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                stock:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - stock
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                stockTasks:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - stock
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                survey:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - survey
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                surveyFeedbacks:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - survey_feedback
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                work:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - work
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                realStartDateEditedBy:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                completeDateEditedBy:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                failureScheduleMapping:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - failure_schedule_mapping
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                pause_reason:
                                  description: The Pause Reason associated with the Scheduled Work
                                  type: object
                                  properties:
                                    data:
                                      type:
                                        - object
                                        - 'null'
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - pause_reason
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                assignees:
                                  description: The Operators and Teams assigned to the Scheduled Work
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - scheduled_work_assignee
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                          required:
                            - id
                            - type
                            - attributes
                    uniqueItems: true
                  meta:
                    title: Meta
                    description: Meta model structure details
                    type: object
                    properties:
                      pagination:
                        type: object
                        properties:
                          total:
                            description: Total items.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          count:
                            description: Total items returned for the current page.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          per_page:
                            description: Maximum number of records per page.
                            type: integer
                            minimum: 1
                            default: 200
                            examples:
                              - 1
                          current_page:
                            description: Number of the current page.
                            type: integer
                            minimum: 1
                            default: 1
                          total_pages:
                            description: Number of the total pages.
                            type: integer
                            minimum: 1
                            default: 1
                        required:
                          - total
                          - count
                          - per_page
                          - current_page
                          - total_pages
                  links:
                    title: Response Links on listing operations
                    description: >-
                      Requests that return multiple items include a `links` attribute, with links related to request's
                      context.
                    type: object
                    properties:
                      self:
                        description: Current response link.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      first:
                        description: Link to the first page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      last:
                        description: Link to the previous page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      next:
                        description: Link to the next page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                    required:
                      - self
                      - first
                      - last
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
    post:
      operationId: createSellOrder
      tags:
        - Sell Orders
      summary: Create a Sell Order
      description: This endpoint allows you to create a Sell Order.
      requestBody:
        content:
          application/json:
            schema:
              description: Sell Order (Sale) Create Payload
              type: object
              properties:
                client_id:
                  description: |
                    ID of the client associated with the Sell Order (Sale).

                    **This field is required if `related_to_type` and `related_to_id` are not filled.**
                  type: integer
                  examples:
                    - 123
                description:
                  description: >
                    Observations or notes for the Sell Order (Sale).


                    This field is a free text input that holds any information regarding the Sell Order (Sale), filled
                    by the user.
                  type:
                    - string
                    - 'null'
                  examples:
                    - Some information regarding the sell Order (Sale)
                internal_sale_id:
                  description: |
                    Internal ID of the Sell Order (Sale).
                  type:
                    - string
                    - 'null'
                  examples:
                    - '123'
                external_sale_id:
                  description: >
                    External ID of the associated Sell Order (Sale).


                    Usually used to identify the Sell Order (Sale) with an unique identifier from a third-party
                    application.
                  type:
                    - string
                    - 'null'
                  examples:
                    - 1e29e166-c6b8-4686-8856-2090d8dc12e1
                related_to_type:
                  description: |
                    Type of the Infraspeak Object related to the Sell Order (Sale).

                    **This is required when the field `related_to_id` is filled.**

                    Allowed values for this field are:
                    - `FAILURE` (Work Order)
                    - `SCHEDULED_WORK` (Planned Job Order)
                  type:
                    - string
                    - 'null'
                  enum:
                    - FAILURE
                    - SCHEDULED_WORK
                  examples:
                    - FAILURE
                related_to_id:
                  description: |
                    ID for the Infraspeak Object related to the Sell Order (Sale).

                    **This is required when the field `related_to_type` is filled.**

                    Possible related objects to a Sell Order (Sale) are:
                    - `FAILURE` (Work Order)
                    - `SCHEDULED_WORK` (Planned Job Order)
                  type:
                    - integer
                    - 'null'
                  examples:
                    - 123
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: Sell Order (Sale)
                    description: |
                      Sell Order (Sale) Resource structure details.
                    type: object
                    properties:
                      id:
                        description: ID for the Sell Order (Sale) in Infraspeak.
                        type: string
                        examples:
                          - '123'
                        readOnly: true
                      type:
                        description: Resource type
                        type: string
                        enum:
                          - sell_order
                        examples:
                          - sell_order
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          client_id:
                            description: |
                              ID of the client associated with the Sell Order (Sale).

                              **This field is required if `related_to_type` and `related_to_id` are not filled.**
                            type: integer
                            examples:
                              - 123
                          code:
                            description: Code used to identify the Sell Order (Sale) in Infraspeak.
                            type: integer
                            examples:
                              - 123
                            readOnly: true
                          sell_order_uuid:
                            description: Universally Unique Identifier (UUID) for the Sell Order (Sale).
                            type: string
                            format: uuid
                            examples:
                              - 3ac7648a-d628-47d8-b9a5-bf6c5edfe176
                            readOnly: true
                          state:
                            description: |
                              Current State for the Sell Order (Sale).

                              Possible states for a Sell Order (Sale) in Infraspeak are:
                              - `DRAFT`
                              - `CANCELLED`
                              - `RUNNING`
                              - `COMPLETED`
                              - `COMPLETED_CONFIRMED`
                            type: string
                            enum:
                              - DRAFT
                              - CANCELLED
                              - RUNNING
                              - COMPLETED
                              - COMPLETED_CONFIRMED
                            examples:
                              - DRAFT
                          entity_id:
                            description: |
                              ID for the Entity this Sell Order (Sale) belongs to in Infraspeak.
                            type: integer
                            examples:
                              - 123
                            readOnly: true
                          created_at:
                            description: Creation date of the Sell Order (Sale).
                            type: string
                            format: date-time
                            examples:
                              - '2020-08-28 08:48:00'
                            readOnly: true
                          created_by:
                            description: ID for the Operator who created the Sell Order (Sale).
                            type: integer
                            examples:
                              - 123
                          started_at:
                            description: Date indicating when the Sell Order (Sale) was Started (state 'RUNNING').
                            type:
                              - string
                              - 'null'
                            format: date-time
                            examples:
                              - '2020-08-28T08:48:00.000Z'
                            readOnly: true
                          started_by:
                            description: ID for the Operator who started the Sell Order (Sale).
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 123
                          completed_at:
                            description: Date indicating when the Sell Order (Sale) was Completed (state 'COMPLETED').
                            type:
                              - string
                              - 'null'
                            format: date-time
                            examples:
                              - '2020-08-28T08:48:00.000Z'
                            readOnly: true
                          completed_by:
                            description: ID for the Operator who completed the Sell Order (Sale).
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 123
                          cancelled_at:
                            description: Date indicating when the Sell Order (Sale) was Cancelled (state 'CANCELED').
                            type:
                              - string
                              - 'null'
                            format: date-time
                            examples:
                              - '2020-08-28T08:48:00.000Z'
                            readOnly: true
                          cancelled_by:
                            description: ID for the Operator that cancelled the Sell Order (Sale).
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 123
                          description:
                            description: >
                              Observations or notes for the Sell Order (Sale).


                              This field is a free text input that holds any information regarding the Sell Order
                              (Sale), filled by the user.
                            type:
                              - string
                              - 'null'
                            examples:
                              - Some information regarding the sell Order (Sale)
                          internal_sale_id:
                            description: |
                              Internal ID of the Sell Order (Sale).
                            type:
                              - string
                              - 'null'
                            examples:
                              - '123'
                          external_sale_id:
                            description: >
                              External ID of the associated Sell Order (Sale).


                              Usually used to identify the Sell Order (Sale) with an unique identifier from a
                              third-party application.
                            type:
                              - string
                              - 'null'
                            examples:
                              - 1e29e166-c6b8-4686-8856-2090d8dc12e1
                          related_to_type:
                            description: |
                              Type of the Infraspeak Object related to the Sell Order (Sale).

                              **This is required when the field `related_to_id` is filled.**

                              Allowed values for this field are:
                              - `FAILURE` (Work Order)
                              - `SCHEDULED_WORK` (Planned Job Order)
                            type:
                              - string
                              - 'null'
                            enum:
                              - FAILURE
                              - SCHEDULED_WORK
                            examples:
                              - FAILURE
                          related_to_id:
                            description: |
                              ID for the Infraspeak Object related to the Sell Order (Sale).

                              **This is required when the field `related_to_type` is filled.**

                              Possible related objects to a Sell Order (Sale) are:
                              - `FAILURE` (Work Order)
                              - `SCHEDULED_WORK` (Planned Job Order)
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 123
                          quote_id:
                            description: ID of the Quote that originated the Sell Order (Sale).
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 123
                          base_total:
                            description: |
                              Total Base Price for the Sell Order (Sale).

                              **This does not include Taxes or Discounts.**
                            type: number
                            examples:
                              - 11.22
                          discount_total:
                            description: |
                              Discount total for the Sell Order (Sale).
                            type: number
                            examples:
                              - 0.22
                          vat_total:
                            description: |
                              Taxes total for the Sell Order (Sale).
                            type: number
                            examples:
                              - 1
                          total:
                            description: |
                              Total Price for the Sell Order (Sale) including Taxes and Discounts.
                            type: number
                            examples:
                              - 12
                          updated_at:
                            description: Date for the last change in the Sell Order (Sale).
                            type: string
                            format: date-time
                            examples:
                              - '2020-08-28T13:05:00.000Z'
                            readOnly: true
                          confirmed_by:
                            description: ID for the Operator that confirmed the Sell Order (Sale).
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 123
                          confirmed_at:
                            description: Date indicating when the Operator confirmed the Sell Order (Sale).
                            type: string
                            format: date-time
                            examples:
                              - '2024-08-28T16:05:00.000Z'
                      meta:
                        type: object
                        properties:
                          custom_fields:
                            type:
                              - object
                              - 'null'
                            additionalProperties:
                              oneOf:
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - SELECT
                                      examples:
                                        - SELECT
                                    value:
                                      description: The current values of the Custom Field in this resource
                                      type:
                                        - array
                                        - 'null'
                                      items:
                                        type: object
                                        properties:
                                          option_id:
                                            description: The ID of the selected option
                                            type: integer
                                            examples:
                                              - 123
                                          option_code:
                                            description: The code of the selected option
                                            type:
                                              - string
                                              - 'null'
                                            examples:
                                              - OP01
                                          value:
                                            description: The value of the selected option
                                            type: string
                                            examples:
                                              - My Option 1
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: The type settings for the Custom Field
                                          type: object
                                          properties:
                                            allow_multiple_selection:
                                              description: Indicates if the Custom Field supports selecting multiple values
                                              type: boolean
                                              examples:
                                                - true
                                            managed_by_integrations:
                                              description: Indicates if the Custom Field options are only managed by integrations
                                              type: boolean
                                              examples:
                                                - true
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - TEXT
                                      examples:
                                        - TEXT
                                    value:
                                      description: The current value of the Custom Field in this resource
                                      type:
                                        - string
                                        - 'null'
                                      examples:
                                        - abc
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: >-
                                            The type settings for the Custom Field (Empty for Custom Fields of type
                                            TEXT)
                                          type: object
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - BOOLEAN
                                      examples:
                                        - BOOLEAN
                                    value:
                                      description: The current value of the Custom Field in this resource
                                      type:
                                        - boolean
                                        - 'null'
                                      examples:
                                        - true
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: >-
                                            The type settings for the Custom Field (There are none for the Custom Field
                                            Boolean type)
                                          type: object
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - RELATIONSHIP
                                      examples:
                                        - RELATIONSHIP
                                    value:
                                      description: The current values of the Custom Field in this resource
                                      type:
                                        - array
                                        - 'null'
                                      items:
                                        type: object
                                        properties:
                                          related_to_type:
                                            description: The type of object that is selected as the Custom Field Values
                                            type: string
                                            enum:
                                              - CLIENT
                                              - CONTACT
                                            examples:
                                              - CLIENT
                                          related_to_id:
                                            description: The ID of object that is selected as the Custom Field Value
                                            type: integer
                                            examples:
                                              - 123
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: The type settings for the Custom Field
                                          type: object
                                          properties:
                                            allow_multiple_selection:
                                              description: Indicates if the Custom Field allows multiple selection
                                              type: boolean
                                              examples:
                                                - false
                                            relationship_object:
                                              description: The type of object that is selected as the Custom Field Values
                                              type: string
                                              enum:
                                                - CLIENT
                                                - CONTACT
                                              examples:
                                                - CLIENT
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - DATETIME
                                      examples:
                                        - DATETIME
                                    value:
                                      description: The current value of the Custom Field in this resource
                                      type:
                                        - string
                                        - 'null'
                                      format: date-time
                                      examples:
                                        - '2025-12-12 12:39:00'
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: The type settings for the Custom Field
                                          type: object
                                          properties:
                                            allow_past_dates:
                                              description: Indicates if this Custom Field support past dates
                                              type: boolean
                                              examples:
                                                - false
                                            allow_future_dates:
                                              description: Indicates if this Custom Field support future dates
                                              type: boolean
                                              examples:
                                                - true
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - NUMBER
                                      examples:
                                        - NUMBER
                                    value:
                                      description: The current value of the Custom Field in this resource
                                      type:
                                        - integer
                                        - 'null'
                                      examples:
                                        - 12
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: The type settings for the Custom Field
                                          type: object
                                          properties:
                                            min:
                                              description: Indicates the minimum value for the Custom Field
                                              type:
                                                - integer
                                                - 'null'
                                              examples:
                                                - 1
                                            max:
                                              description: Indicates the maximum value for the Custom Field
                                              type:
                                                - integer
                                                - 'null'
                                              examples:
                                                - 3
                              discriminator:
                                propertyName: field_type
                  included:
                    description: >
                      List of expanded relationships for the Sell Order (Sale).


                      Items available in this list will vary depending on the value supplied in `expanded` query
                      parameter.
                    type: array
                    items:
                      anyOf:
                        - title: Entity
                          description: Entity model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Supplier
                              type: string
                              examples:
                                - '1'
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - entity
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                entity_id:
                                  type: integer
                                name:
                                  type: string
                                email:
                                  type: string
                                site:
                                  type: string
                                phone:
                                  type: string
                                cellphone:
                                  type: string
                                address:
                                  type: string
                                nib:
                                  type: string
                                nif:
                                  type: string
                                report_email:
                                  type: string
                                language:
                                  type: string
                                currency:
                                  type: string
                                license:
                                  type: string
                                  enum:
                                    - ASSISTANCE
                                    - CHURNED
                                    - COMPLEX
                                    - CSENTITY
                                    - DISTRIBUTED
                                    - HOTEL
                                    - NONE
                                    - PARTNER
                                    - PLACECHECKUP
                                profile_picture:
                                  type: string
                                entity_uuid:
                                  type: string
                                vat_rate:
                                  type: number
                                colour:
                                  type: string
                        - title: Operator
                          description: Operator model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Operator
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - operator
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                operator_id:
                                  description: ID of the Operator
                                  type: integer
                                  readOnly: true
                                operator_uuid:
                                  description: Uuid of the Operator
                                  type: string
                                  format: uuid
                                  readOnly: true
                                full_name:
                                  type: string
                                email:
                                  type: string
                                  format: email
                                phone:
                                  type:
                                    - string
                                    - 'null'
                                cellphone:
                                  type:
                                    - string
                                    - 'null'
                                account:
                                  description: Type of account which determines the access permission level.
                                  type: string
                                  enum:
                                    - admin
                                    - manager
                                    - technician
                                    - operator
                                    - reporter
                                language:
                                  type: string
                                  enum:
                                    - ar
                                    - ca
                                    - da_dk
                                    - en
                                    - es
                                    - fr_fr
                                    - pl_pl
                                    - pt_br
                                    - pt_pt
                                    - ko
                                    - zh_cn
                                    - nl_nl
                                    - de_de
                                cost_per_hour:
                                  type: number
                                  minimum: 0
                                  examples:
                                    - 10
                                warehouse_id:
                                  description: ID of the warehouse associated to the Operator by default.
                                  type: integer
                                entity_id:
                                  type: integer
                                  readOnly: true
                                timezone:
                                  description: >
                                    Valid PHP timezone identifier. See the full list here:
                                    https://www.php.net/manual/en/timezones.php.
                                  type: string
                                  examples:
                                    - Europe/Lisbon
                                is_from_network:
                                  type: boolean
                                created_at:
                                  type: string
                                  format: date-time
                                phone_country_code:
                                  type: string
                                  examples:
                                    - US
                                is_first_web_login:
                                  type:
                                    - boolean
                                    - 'null'
                                  readOnly: true
                                status:
                                  type: string
                                  enum:
                                    - WORKING
                                    - AVAILABLE
                                    - OFFLINE
                                  examples:
                                    - WORKING
                            meta:
                              type: object
                              properties:
                                custom_fields:
                                  type:
                                    - object
                                    - 'null'
                                  additionalProperties:
                                    oneOf:
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - SELECT
                                            examples:
                                              - SELECT
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                option_id:
                                                  description: The ID of the selected option
                                                  type: integer
                                                  examples:
                                                    - 123
                                                option_code:
                                                  description: The code of the selected option
                                                  type:
                                                    - string
                                                    - 'null'
                                                  examples:
                                                    - OP01
                                                value:
                                                  description: The value of the selected option
                                                  type: string
                                                  examples:
                                                    - My Option 1
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field supports selecting multiple values
                                                    type: boolean
                                                    examples:
                                                      - true
                                                  managed_by_integrations:
                                                    description: >-
                                                      Indicates if the Custom Field options are only managed by
                                                      integrations
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - TEXT
                                            examples:
                                              - TEXT
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            examples:
                                              - abc
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (Empty for Custom Fields of
                                                  type TEXT)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - BOOLEAN
                                            examples:
                                              - BOOLEAN
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - boolean
                                              - 'null'
                                            examples:
                                              - true
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (There are none for the Custom
                                                  Field Boolean type)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - RELATIONSHIP
                                            examples:
                                              - RELATIONSHIP
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                related_to_type:
                                                  description: The type of object that is selected as the Custom Field Values
                                                  type: string
                                                  enum:
                                                    - CLIENT
                                                    - CONTACT
                                                  examples:
                                                    - CLIENT
                                                related_to_id:
                                                  description: The ID of object that is selected as the Custom Field Value
                                                  type: integer
                                                  examples:
                                                    - 123
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field allows multiple selection
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  relationship_object:
                                                    description: The type of object that is selected as the Custom Field Values
                                                    type: string
                                                    enum:
                                                      - CLIENT
                                                      - CONTACT
                                                    examples:
                                                      - CLIENT
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - DATETIME
                                            examples:
                                              - DATETIME
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-12-12 12:39:00'
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_past_dates:
                                                    description: Indicates if this Custom Field support past dates
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  allow_future_dates:
                                                    description: Indicates if this Custom Field support future dates
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - NUMBER
                                            examples:
                                              - NUMBER
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - integer
                                              - 'null'
                                            examples:
                                              - 12
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  min:
                                                    description: Indicates the minimum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 1
                                                  max:
                                                    description: Indicates the maximum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 3
                                    discriminator:
                                      propertyName: field_type
                        - title: Operator
                          description: Operator model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Operator
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - operator
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                operator_id:
                                  description: ID of the Operator
                                  type: integer
                                  readOnly: true
                                operator_uuid:
                                  description: Uuid of the Operator
                                  type: string
                                  format: uuid
                                  readOnly: true
                                full_name:
                                  type: string
                                email:
                                  type: string
                                  format: email
                                phone:
                                  type:
                                    - string
                                    - 'null'
                                cellphone:
                                  type:
                                    - string
                                    - 'null'
                                account:
                                  description: Type of account which determines the access permission level.
                                  type: string
                                  enum:
                                    - admin
                                    - manager
                                    - technician
                                    - operator
                                    - reporter
                                language:
                                  type: string
                                  enum:
                                    - ar
                                    - ca
                                    - da_dk
                                    - en
                                    - es
                                    - fr_fr
                                    - pl_pl
                                    - pt_br
                                    - pt_pt
                                    - ko
                                    - zh_cn
                                    - nl_nl
                                    - de_de
                                cost_per_hour:
                                  type: number
                                  minimum: 0
                                  examples:
                                    - 10
                                warehouse_id:
                                  description: ID of the warehouse associated to the Operator by default.
                                  type: integer
                                entity_id:
                                  type: integer
                                  readOnly: true
                                timezone:
                                  description: >
                                    Valid PHP timezone identifier. See the full list here:
                                    https://www.php.net/manual/en/timezones.php.
                                  type: string
                                  examples:
                                    - Europe/Lisbon
                                is_from_network:
                                  type: boolean
                                created_at:
                                  type: string
                                  format: date-time
                                phone_country_code:
                                  type: string
                                  examples:
                                    - US
                                is_first_web_login:
                                  type:
                                    - boolean
                                    - 'null'
                                  readOnly: true
                                status:
                                  type: string
                                  enum:
                                    - WORKING
                                    - AVAILABLE
                                    - OFFLINE
                                  examples:
                                    - WORKING
                            meta:
                              type: object
                              properties:
                                custom_fields:
                                  type:
                                    - object
                                    - 'null'
                                  additionalProperties:
                                    oneOf:
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - SELECT
                                            examples:
                                              - SELECT
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                option_id:
                                                  description: The ID of the selected option
                                                  type: integer
                                                  examples:
                                                    - 123
                                                option_code:
                                                  description: The code of the selected option
                                                  type:
                                                    - string
                                                    - 'null'
                                                  examples:
                                                    - OP01
                                                value:
                                                  description: The value of the selected option
                                                  type: string
                                                  examples:
                                                    - My Option 1
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field supports selecting multiple values
                                                    type: boolean
                                                    examples:
                                                      - true
                                                  managed_by_integrations:
                                                    description: >-
                                                      Indicates if the Custom Field options are only managed by
                                                      integrations
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - TEXT
                                            examples:
                                              - TEXT
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            examples:
                                              - abc
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (Empty for Custom Fields of
                                                  type TEXT)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - BOOLEAN
                                            examples:
                                              - BOOLEAN
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - boolean
                                              - 'null'
                                            examples:
                                              - true
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (There are none for the Custom
                                                  Field Boolean type)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - RELATIONSHIP
                                            examples:
                                              - RELATIONSHIP
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                related_to_type:
                                                  description: The type of object that is selected as the Custom Field Values
                                                  type: string
                                                  enum:
                                                    - CLIENT
                                                    - CONTACT
                                                  examples:
                                                    - CLIENT
                                                related_to_id:
                                                  description: The ID of object that is selected as the Custom Field Value
                                                  type: integer
                                                  examples:
                                                    - 123
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field allows multiple selection
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  relationship_object:
                                                    description: The type of object that is selected as the Custom Field Values
                                                    type: string
                                                    enum:
                                                      - CLIENT
                                                      - CONTACT
                                                    examples:
                                                      - CLIENT
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - DATETIME
                                            examples:
                                              - DATETIME
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-12-12 12:39:00'
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_past_dates:
                                                    description: Indicates if this Custom Field support past dates
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  allow_future_dates:
                                                    description: Indicates if this Custom Field support future dates
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - NUMBER
                                            examples:
                                              - NUMBER
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - integer
                                              - 'null'
                                            examples:
                                              - 12
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  min:
                                                    description: Indicates the minimum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 1
                                                  max:
                                                    description: Indicates the maximum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 3
                                    discriminator:
                                      propertyName: field_type
                        - title: Operator
                          description: Operator model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Operator
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - operator
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                operator_id:
                                  description: ID of the Operator
                                  type: integer
                                  readOnly: true
                                operator_uuid:
                                  description: Uuid of the Operator
                                  type: string
                                  format: uuid
                                  readOnly: true
                                full_name:
                                  type: string
                                email:
                                  type: string
                                  format: email
                                phone:
                                  type:
                                    - string
                                    - 'null'
                                cellphone:
                                  type:
                                    - string
                                    - 'null'
                                account:
                                  description: Type of account which determines the access permission level.
                                  type: string
                                  enum:
                                    - admin
                                    - manager
                                    - technician
                                    - operator
                                    - reporter
                                language:
                                  type: string
                                  enum:
                                    - ar
                                    - ca
                                    - da_dk
                                    - en
                                    - es
                                    - fr_fr
                                    - pl_pl
                                    - pt_br
                                    - pt_pt
                                    - ko
                                    - zh_cn
                                    - nl_nl
                                    - de_de
                                cost_per_hour:
                                  type: number
                                  minimum: 0
                                  examples:
                                    - 10
                                warehouse_id:
                                  description: ID of the warehouse associated to the Operator by default.
                                  type: integer
                                entity_id:
                                  type: integer
                                  readOnly: true
                                timezone:
                                  description: >
                                    Valid PHP timezone identifier. See the full list here:
                                    https://www.php.net/manual/en/timezones.php.
                                  type: string
                                  examples:
                                    - Europe/Lisbon
                                is_from_network:
                                  type: boolean
                                created_at:
                                  type: string
                                  format: date-time
                                phone_country_code:
                                  type: string
                                  examples:
                                    - US
                                is_first_web_login:
                                  type:
                                    - boolean
                                    - 'null'
                                  readOnly: true
                                status:
                                  type: string
                                  enum:
                                    - WORKING
                                    - AVAILABLE
                                    - OFFLINE
                                  examples:
                                    - WORKING
                            meta:
                              type: object
                              properties:
                                custom_fields:
                                  type:
                                    - object
                                    - 'null'
                                  additionalProperties:
                                    oneOf:
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - SELECT
                                            examples:
                                              - SELECT
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                option_id:
                                                  description: The ID of the selected option
                                                  type: integer
                                                  examples:
                                                    - 123
                                                option_code:
                                                  description: The code of the selected option
                                                  type:
                                                    - string
                                                    - 'null'
                                                  examples:
                                                    - OP01
                                                value:
                                                  description: The value of the selected option
                                                  type: string
                                                  examples:
                                                    - My Option 1
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field supports selecting multiple values
                                                    type: boolean
                                                    examples:
                                                      - true
                                                  managed_by_integrations:
                                                    description: >-
                                                      Indicates if the Custom Field options are only managed by
                                                      integrations
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - TEXT
                                            examples:
                                              - TEXT
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            examples:
                                              - abc
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (Empty for Custom Fields of
                                                  type TEXT)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - BOOLEAN
                                            examples:
                                              - BOOLEAN
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - boolean
                                              - 'null'
                                            examples:
                                              - true
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (There are none for the Custom
                                                  Field Boolean type)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - RELATIONSHIP
                                            examples:
                                              - RELATIONSHIP
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                related_to_type:
                                                  description: The type of object that is selected as the Custom Field Values
                                                  type: string
                                                  enum:
                                                    - CLIENT
                                                    - CONTACT
                                                  examples:
                                                    - CLIENT
                                                related_to_id:
                                                  description: The ID of object that is selected as the Custom Field Value
                                                  type: integer
                                                  examples:
                                                    - 123
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field allows multiple selection
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  relationship_object:
                                                    description: The type of object that is selected as the Custom Field Values
                                                    type: string
                                                    enum:
                                                      - CLIENT
                                                      - CONTACT
                                                    examples:
                                                      - CLIENT
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - DATETIME
                                            examples:
                                              - DATETIME
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-12-12 12:39:00'
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_past_dates:
                                                    description: Indicates if this Custom Field support past dates
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  allow_future_dates:
                                                    description: Indicates if this Custom Field support future dates
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - NUMBER
                                            examples:
                                              - NUMBER
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - integer
                                              - 'null'
                                            examples:
                                              - 12
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  min:
                                                    description: Indicates the minimum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 1
                                                  max:
                                                    description: Indicates the maximum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 3
                                    discriminator:
                                      propertyName: field_type
                        - title: Operator
                          description: Operator model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Operator
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - operator
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                operator_id:
                                  description: ID of the Operator
                                  type: integer
                                  readOnly: true
                                operator_uuid:
                                  description: Uuid of the Operator
                                  type: string
                                  format: uuid
                                  readOnly: true
                                full_name:
                                  type: string
                                email:
                                  type: string
                                  format: email
                                phone:
                                  type:
                                    - string
                                    - 'null'
                                cellphone:
                                  type:
                                    - string
                                    - 'null'
                                account:
                                  description: Type of account which determines the access permission level.
                                  type: string
                                  enum:
                                    - admin
                                    - manager
                                    - technician
                                    - operator
                                    - reporter
                                language:
                                  type: string
                                  enum:
                                    - ar
                                    - ca
                                    - da_dk
                                    - en
                                    - es
                                    - fr_fr
                                    - pl_pl
                                    - pt_br
                                    - pt_pt
                                    - ko
                                    - zh_cn
                                    - nl_nl
                                    - de_de
                                cost_per_hour:
                                  type: number
                                  minimum: 0
                                  examples:
                                    - 10
                                warehouse_id:
                                  description: ID of the warehouse associated to the Operator by default.
                                  type: integer
                                entity_id:
                                  type: integer
                                  readOnly: true
                                timezone:
                                  description: >
                                    Valid PHP timezone identifier. See the full list here:
                                    https://www.php.net/manual/en/timezones.php.
                                  type: string
                                  examples:
                                    - Europe/Lisbon
                                is_from_network:
                                  type: boolean
                                created_at:
                                  type: string
                                  format: date-time
                                phone_country_code:
                                  type: string
                                  examples:
                                    - US
                                is_first_web_login:
                                  type:
                                    - boolean
                                    - 'null'
                                  readOnly: true
                                status:
                                  type: string
                                  enum:
                                    - WORKING
                                    - AVAILABLE
                                    - OFFLINE
                                  examples:
                                    - WORKING
                            meta:
                              type: object
                              properties:
                                custom_fields:
                                  type:
                                    - object
                                    - 'null'
                                  additionalProperties:
                                    oneOf:
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - SELECT
                                            examples:
                                              - SELECT
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                option_id:
                                                  description: The ID of the selected option
                                                  type: integer
                                                  examples:
                                                    - 123
                                                option_code:
                                                  description: The code of the selected option
                                                  type:
                                                    - string
                                                    - 'null'
                                                  examples:
                                                    - OP01
                                                value:
                                                  description: The value of the selected option
                                                  type: string
                                                  examples:
                                                    - My Option 1
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field supports selecting multiple values
                                                    type: boolean
                                                    examples:
                                                      - true
                                                  managed_by_integrations:
                                                    description: >-
                                                      Indicates if the Custom Field options are only managed by
                                                      integrations
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - TEXT
                                            examples:
                                              - TEXT
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            examples:
                                              - abc
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (Empty for Custom Fields of
                                                  type TEXT)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - BOOLEAN
                                            examples:
                                              - BOOLEAN
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - boolean
                                              - 'null'
                                            examples:
                                              - true
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (There are none for the Custom
                                                  Field Boolean type)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - RELATIONSHIP
                                            examples:
                                              - RELATIONSHIP
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                related_to_type:
                                                  description: The type of object that is selected as the Custom Field Values
                                                  type: string
                                                  enum:
                                                    - CLIENT
                                                    - CONTACT
                                                  examples:
                                                    - CLIENT
                                                related_to_id:
                                                  description: The ID of object that is selected as the Custom Field Value
                                                  type: integer
                                                  examples:
                                                    - 123
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field allows multiple selection
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  relationship_object:
                                                    description: The type of object that is selected as the Custom Field Values
                                                    type: string
                                                    enum:
                                                      - CLIENT
                                                      - CONTACT
                                                    examples:
                                                      - CLIENT
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - DATETIME
                                            examples:
                                              - DATETIME
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-12-12 12:39:00'
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_past_dates:
                                                    description: Indicates if this Custom Field support past dates
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  allow_future_dates:
                                                    description: Indicates if this Custom Field support future dates
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - NUMBER
                                            examples:
                                              - NUMBER
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - integer
                                              - 'null'
                                            examples:
                                              - 12
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  min:
                                                    description: Indicates the minimum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 1
                                                  max:
                                                    description: Indicates the maximum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 3
                                    discriminator:
                                      propertyName: field_type
                        - title: Operator
                          description: Operator model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Operator
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - operator
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                operator_id:
                                  description: ID of the Operator
                                  type: integer
                                  readOnly: true
                                operator_uuid:
                                  description: Uuid of the Operator
                                  type: string
                                  format: uuid
                                  readOnly: true
                                full_name:
                                  type: string
                                email:
                                  type: string
                                  format: email
                                phone:
                                  type:
                                    - string
                                    - 'null'
                                cellphone:
                                  type:
                                    - string
                                    - 'null'
                                account:
                                  description: Type of account which determines the access permission level.
                                  type: string
                                  enum:
                                    - admin
                                    - manager
                                    - technician
                                    - operator
                                    - reporter
                                language:
                                  type: string
                                  enum:
                                    - ar
                                    - ca
                                    - da_dk
                                    - en
                                    - es
                                    - fr_fr
                                    - pl_pl
                                    - pt_br
                                    - pt_pt
                                    - ko
                                    - zh_cn
                                    - nl_nl
                                    - de_de
                                cost_per_hour:
                                  type: number
                                  minimum: 0
                                  examples:
                                    - 10
                                warehouse_id:
                                  description: ID of the warehouse associated to the Operator by default.
                                  type: integer
                                entity_id:
                                  type: integer
                                  readOnly: true
                                timezone:
                                  description: >
                                    Valid PHP timezone identifier. See the full list here:
                                    https://www.php.net/manual/en/timezones.php.
                                  type: string
                                  examples:
                                    - Europe/Lisbon
                                is_from_network:
                                  type: boolean
                                created_at:
                                  type: string
                                  format: date-time
                                phone_country_code:
                                  type: string
                                  examples:
                                    - US
                                is_first_web_login:
                                  type:
                                    - boolean
                                    - 'null'
                                  readOnly: true
                                status:
                                  type: string
                                  enum:
                                    - WORKING
                                    - AVAILABLE
                                    - OFFLINE
                                  examples:
                                    - WORKING
                            meta:
                              type: object
                              properties:
                                custom_fields:
                                  type:
                                    - object
                                    - 'null'
                                  additionalProperties:
                                    oneOf:
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - SELECT
                                            examples:
                                              - SELECT
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                option_id:
                                                  description: The ID of the selected option
                                                  type: integer
                                                  examples:
                                                    - 123
                                                option_code:
                                                  description: The code of the selected option
                                                  type:
                                                    - string
                                                    - 'null'
                                                  examples:
                                                    - OP01
                                                value:
                                                  description: The value of the selected option
                                                  type: string
                                                  examples:
                                                    - My Option 1
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field supports selecting multiple values
                                                    type: boolean
                                                    examples:
                                                      - true
                                                  managed_by_integrations:
                                                    description: >-
                                                      Indicates if the Custom Field options are only managed by
                                                      integrations
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - TEXT
                                            examples:
                                              - TEXT
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            examples:
                                              - abc
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (Empty for Custom Fields of
                                                  type TEXT)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - BOOLEAN
                                            examples:
                                              - BOOLEAN
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - boolean
                                              - 'null'
                                            examples:
                                              - true
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (There are none for the Custom
                                                  Field Boolean type)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - RELATIONSHIP
                                            examples:
                                              - RELATIONSHIP
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                related_to_type:
                                                  description: The type of object that is selected as the Custom Field Values
                                                  type: string
                                                  enum:
                                                    - CLIENT
                                                    - CONTACT
                                                  examples:
                                                    - CLIENT
                                                related_to_id:
                                                  description: The ID of object that is selected as the Custom Field Value
                                                  type: integer
                                                  examples:
                                                    - 123
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field allows multiple selection
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  relationship_object:
                                                    description: The type of object that is selected as the Custom Field Values
                                                    type: string
                                                    enum:
                                                      - CLIENT
                                                      - CONTACT
                                                    examples:
                                                      - CLIENT
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - DATETIME
                                            examples:
                                              - DATETIME
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-12-12 12:39:00'
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_past_dates:
                                                    description: Indicates if this Custom Field support past dates
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  allow_future_dates:
                                                    description: Indicates if this Custom Field support future dates
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - NUMBER
                                            examples:
                                              - NUMBER
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - integer
                                              - 'null'
                                            examples:
                                              - 12
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  min:
                                                    description: Indicates the minimum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 1
                                                  max:
                                                    description: Indicates the maximum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 3
                                    discriminator:
                                      propertyName: field_type
                        - title: Clients
                          description: Client model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Client
                              type: string
                              examples:
                                - '123'
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - client
                              examples:
                                - client
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                client_id:
                                  description: ID of the Client
                                  type: integer
                                  examples:
                                    - 123
                                client_uuid:
                                  description: UUID of the Client
                                  type: string
                                  format: uuid
                                  examples:
                                    - e632afe8-a1bf-4702-b5bd-b1163861ba51
                                name:
                                  description: Client Name
                                  type: string
                                  examples:
                                    - John Doe
                                code:
                                  description: Client Code
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - JD
                                nif:
                                  description: NIF/ VAT Number of the Client
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - '1234566789'
                                postal_code:
                                  description: Postal Code of the Client
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - 1234-567
                                city:
                                  description: City of the Client
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - Lisbon
                                observations:
                                  description: Additional information
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - abc
                                address:
                                  description: Address of the Client
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - abc
                                country:
                                  description: Country of the Client
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - PT
                                created_at:
                                  description: The datetime of the creation of the Client
                                  type: string
                                  format: date-time
                                  examples:
                                    - '2020-12-03T12:45:00'
                                  readOnly: true
                                updated_at:
                                  description: The datetime of the last update of the Client
                                  type: string
                                  format: date-time
                                  examples:
                                    - '2020-12-03T12:45:00'
                                  readOnly: true
                                has_handshake:
                                  description: Indicates if this Client is "connected" to work on Infraspeak Network.
                                  type: boolean
                                  examples:
                                    - true
                                my_company:
                                  description: Indicates whether it is the entity's default client
                                  type: boolean
                                  examples:
                                    - true
                            relationships:
                              description: The relationships of the Client (Only present when expanded in the request)
                              type: object
                              properties:
                                buildings:
                                  description: The Buildings associated to the Client
                                  type: object
                                contacts:
                                  description: The Contacts associated to the Client
                                  type: object
                                files:
                                  description: The Files associated to the Client
                                  type: object
                                profilePicture:
                                  description: The profile picture of the the Client
                                  type: object
                                operators:
                                  description: The Operators associated to the Client
                                  type: object
                                handshake:
                                  description: The Handshake associated to the Client
                                  type: object
                          required:
                            - id
                            - type
                            - attributes
                        - title: Contact
                          description: Contact model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Contact
                              type: string
                              readOnly: true
                              examples:
                                - '123'
                            type:
                              description: Model type
                              type: string
                              enum:
                                - contact
                              readOnly: true
                              examples:
                                - contact
                            attributes:
                              type: object
                              properties:
                                contact_id:
                                  description: ID of the Contact
                                  type: integer
                                  readOnly: true
                                  examples:
                                    - 123
                                entity_id:
                                  description: ID of the Entity
                                  type: integer
                                  readOnly: true
                                  examples:
                                    - 123
                                cellphone:
                                  description: The cellphone number of the Contact
                                  type: string
                                  examples:
                                    - '123456789'
                                language:
                                  description: The language of the Contact
                                  type: string
                                  examples:
                                    - pt_br
                                email:
                                  description: The email of the Contact
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - foo@bar.com
                                full_name:
                                  description: The full name of the Contact
                                  type: string
                                  examples:
                                    - Jose Pinhal
                                phone:
                                  description: The phone number of the Contact
                                  type: string
                                  examples:
                                    - '123456789'
                                is_direct_user:
                                  description: Indicates whether the contact is a Direct user
                                  type: boolean
                                  examples:
                                    - false
                                has_access:
                                  description: Indicates whether the contact has access to Direct
                                  oneOf:
                                    - type: boolean
                                    - type: integer
                                      enum:
                                        - 0
                                        - 1
                                  examples:
                                    - false
                            relationships:
                              description: The relationships of the Contact
                              type: object
                              properties:
                                suppliers:
                                  description: The Suppliers associated to the Contact
                                  type: object
                                clients:
                                  description: The Clients associated to the Contact
                                  type: object
                                extensionsPermissions:
                                  description: The Extensions Permissions associated to the Contact
                                  type: object
                                locals:
                                  description: The Locations associated to the Contact
                                  type: object
                                profilePicture:
                                  description: The profile picture of the Contact
                                  type: object
                                user:
                                  description: The user associated to the Contact
                                  type: object
                            meta:
                              type: object
                              properties:
                                custom_fields:
                                  type:
                                    - object
                                    - 'null'
                                  additionalProperties:
                                    oneOf:
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - SELECT
                                            examples:
                                              - SELECT
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                option_id:
                                                  description: The ID of the selected option
                                                  type: integer
                                                  examples:
                                                    - 123
                                                option_code:
                                                  description: The code of the selected option
                                                  type:
                                                    - string
                                                    - 'null'
                                                  examples:
                                                    - OP01
                                                value:
                                                  description: The value of the selected option
                                                  type: string
                                                  examples:
                                                    - My Option 1
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field supports selecting multiple values
                                                    type: boolean
                                                    examples:
                                                      - true
                                                  managed_by_integrations:
                                                    description: >-
                                                      Indicates if the Custom Field options are only managed by
                                                      integrations
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - TEXT
                                            examples:
                                              - TEXT
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            examples:
                                              - abc
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (Empty for Custom Fields of
                                                  type TEXT)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - BOOLEAN
                                            examples:
                                              - BOOLEAN
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - boolean
                                              - 'null'
                                            examples:
                                              - true
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (There are none for the Custom
                                                  Field Boolean type)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - RELATIONSHIP
                                            examples:
                                              - RELATIONSHIP
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                related_to_type:
                                                  description: The type of object that is selected as the Custom Field Values
                                                  type: string
                                                  enum:
                                                    - CLIENT
                                                    - CONTACT
                                                  examples:
                                                    - CLIENT
                                                related_to_id:
                                                  description: The ID of object that is selected as the Custom Field Value
                                                  type: integer
                                                  examples:
                                                    - 123
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field allows multiple selection
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  relationship_object:
                                                    description: The type of object that is selected as the Custom Field Values
                                                    type: string
                                                    enum:
                                                      - CLIENT
                                                      - CONTACT
                                                    examples:
                                                      - CLIENT
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - DATETIME
                                            examples:
                                              - DATETIME
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-12-12 12:39:00'
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_past_dates:
                                                    description: Indicates if this Custom Field support past dates
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  allow_future_dates:
                                                    description: Indicates if this Custom Field support future dates
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - NUMBER
                                            examples:
                                              - NUMBER
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - integer
                                              - 'null'
                                            examples:
                                              - 12
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  min:
                                                    description: Indicates the minimum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 1
                                                  max:
                                                    description: Indicates the maximum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 3
                                    discriminator:
                                      propertyName: field_type
                          required:
                            - id
                            - type
                            - attributes
                        - title: Failure
                          description: Failure model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Failure
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - failure
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                failure_id:
                                  description: ID of the Failure
                                  type: integer
                                  readOnly: true
                                  examples:
                                    - 1
                                uuid:
                                  description: Universally Unique Identifier for the Failure
                                  type: string
                                  format: uuid
                                  readOnly: true
                                problem_id:
                                  description: ID of the associated problem
                                  type: integer
                                status:
                                  type: string
                                  enum:
                                    - WAITING_APPROVAL
                                    - WAITING_RESOLUTION
                                    - IN_RESOLUTION
                                    - PAUSED
                                    - COMPLETED
                                    - ARCHIVED
                                  readOnly: true
                                start_date:
                                  type: string
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T08:48:00.000Z'
                                completed_date:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T17:12:00.000Z'
                                approved_date:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T09:30:00.000Z'
                                paused_date:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T13:05:00.000Z'
                                description:
                                  type: string
                                  examples:
                                    - Needs replacement
                                last_status_description:
                                  type: string
                                  examples:
                                    - Completed
                                observations:
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - Needs a new part
                                code:
                                  type: string
                                  examples:
                                    - WO2022
                                fts_vector:
                                  description: Denormalized data of a Failure
                                  type: string
                                priority:
                                  description: Failure priority number being 1 the lowest priority and 4 the highest priority.
                                  type: integer
                                  enum:
                                    - 1
                                    - 2
                                    - 3
                                    - 4
                                client_id:
                                  description: ID of the associated client defined according to the respective `local_id`.
                                  type: integer
                                  readOnly: true
                                entity_id:
                                  description: ID of the Entity of the Failure
                                  type: integer
                                  readOnly: true
                                metering_registry_id:
                                  description: ID of a possible associated metering registry
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                local_id:
                                  description: ID of the location associated to the Failure
                                  type: integer
                                paused_reason_id:
                                  description: ID of the paused reason associated to the Failure
                                  type: integer
                                external_id:
                                  description: External ID to be associated to the Failure
                                  type:
                                    - string
                                    - 'null'
                                report_name:
                                  description: Name of who reported the Failure
                                  type: string
                                solved:
                                  description: Indicates whether the Failure was closed successfully or not
                                  type: boolean
                                  readOnly: true
                                  default: false
                                confirmed:
                                  description: Indicates whether the Failure is confirmed or not
                                  type: boolean
                                  readOnly: true
                                  default: false
                                started:
                                  description: Indicates whether the Failure is started or not
                                  type: boolean
                                  readOnly: true
                                  default: false
                                paused:
                                  description: Indicates whether the Failure is paused or not
                                  type: boolean
                                  readOnly: true
                                  default: false
                                completed:
                                  description: Indicates whether the Failure is completed or not
                                  type: boolean
                                  readOnly: true
                                  default: false
                                archived:
                                  description: Indicates whether the Failure is archived or not
                                  type: boolean
                                  readOnly: true
                                  default: false
                                approved:
                                  description: Indicates whether the Failure is approved or not
                                  type: boolean
                                  readOnly: true
                                  default: false
                                next_schedule:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-29T10:30:00.000Z'
                                message_count:
                                  type: integer
                                  minimum: 0
                                  default: 0
                                  examples:
                                    - 3
                                time_statistics:
                                  type: object
                                  properties:
                                    approved_date:
                                      type:
                                        - string
                                        - 'null'
                                      format: date-time
                                      readOnly: true
                                      examples:
                                        - '2020-08-28T09:30:00.000Z'
                                    last_completed_date:
                                      type:
                                        - string
                                        - 'null'
                                      format: date-time
                                      readOnly: true
                                      examples:
                                        - '2020-08-28T17:12:00.000Z'
                                    last_paused_date:
                                      type:
                                        - string
                                        - 'null'
                                      format: date-time
                                      readOnly: true
                                      examples:
                                        - '2020-08-28T13:05:00.000Z'
                                    started_date:
                                      type:
                                        - string
                                        - 'null'
                                      format: date-time
                                      readOnly: true
                                      examples:
                                        - '2020-08-28T09:45:00.000Z'
                                    time_to_approve:
                                      description: Duration it took to approve the Failure since reported in `ISO8601` format.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - P0Y0M0DT0H42M0S
                                    time_to_complete:
                                      description: Duration it took to complete the Failure since reported in `ISO8601` format.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - P0Y0M0DT8H24M0S
                                    time_to_complete_after_started:
                                      description: >-
                                        Duration it took to complete the Failure since the resolution started in
                                        `ISO8601` format.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - P0Y0M0DT7H27M0S
                                    time_to_start:
                                      description: >-
                                        Duration it took to start the Failure's resolution since reported in `ISO8601`
                                        format.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - P0Y0M0DT0H57M0S
                                    time_to_start_after_approved:
                                      description: >-
                                        Duration it took to start the Failure's resolution since approved in `ISO8601`
                                        format.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - P0Y0M0DT0H15M0S
                                    real_duration:
                                      description: Real duration of the Failure's resolution time in `ISO8601` format.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - P0Y0M0DT7H27M0S
                                supplier_id:
                                  description: ID of the supplier associated to the Failure
                                  type: integer
                                signature_status:
                                  description: Indicates whether the Failure is signed or not
                                  type: string
                                  enum:
                                    - SIGNED
                                    - NOT_SIGNED
                                  default: NOT_SIGNED
                                last_status_change_date:
                                  type: string
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T09:30:00.000Z'
                                approved_by_id:
                                  description: ID of the operator who approved the Failure.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                completed_by_id:
                                  description: ID of the operator who completed the Failure.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                started_by_id:
                                  description: ID of the operator who started the Failure's resolution.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                paused_by_id:
                                  description: ID of the operator who paused the Failure's resolution.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                approved_by:
                                  description: Name of the operator who approved the Failure.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                completed_by:
                                  description: Name of the operator who completed the Failure.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                started_by:
                                  description: Name of the operator who started the Failure's resolution.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                paused_by:
                                  description: Name of the operator who paused the Failure's resolution.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                reported_by:
                                  description: Name of the operator who reported the Failure.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                manpower_duration:
                                  description: Duration of the Failure's manpower time in `ISO8601` format.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                  examples:
                                    - P0Y0M0DT7H27M0S
                                cost_center_id:
                                  description: ID of the cost center associated to the Failure
                                  type:
                                    - integer
                                    - 'null'
                                network_failure_id:
                                  description: ID of the Network Failure
                                  type: integer
                                  readOnly: true
                                  examples:
                                    - 1
                                created_at:
                                  type: string
                                  format: date-time
                                  readOnly: true
                                updated_at:
                                  type: string
                                  format: date-time
                                  readOnly: true
                                date_deleted:
                                  type: string
                                  format: date-time
                                  readOnly: true
                            relationships:
                              type: object
                              properties:
                                approvedBy:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                completedBy:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                createdBy:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                files:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - file
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                location:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - location
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                operator:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                          required:
                            - id
                            - type
                            - attributes
                        - title: File
                          description: File model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the File
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - file
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                file_id:
                                  description: File Id
                                  type: integer
                                  readOnly: true
                                file_uuid:
                                  description: File UUID
                                  type: string
                                  readOnly: true
                                related_to:
                                  description: Object which the File is related to
                                  type: string
                                  enum:
                                    - BUILDING
                                    - CATEGORY
                                    - CLIENT
                                    - ELEMENT
                                    - ELEMENT_REGISTRY
                                    - FAILURE
                                    - METERING_REGISTRY
                                    - OPERATOR
                                    - ORDER
                                    - QUOTE
                                    - QUOTE_REQUEST
                                    - RECEIVED_QUOTE
                                    - RECEIVED_QUOTE_REQUEST
                                    - REQUEST
                                    - SELL_ORDER
                                    - SUPPLIER
                                    - SCHEDULE_WORK
                                    - WORK
                                    - SCHEDULED_WORK
                                    - PURCHASE
                                    - PURCHASE_MATERIAL_LINE
                                    - PURCHASE_SERVICE_LINE
                                    - SALE
                                related_to_id:
                                  description: Relations Id
                                  type: integer
                                related_type:
                                  description: Object which the File is related to
                                  type: string
                                  enum:
                                    - BUILDING
                                    - CATEGORY
                                    - CLIENT
                                    - ELEMENT
                                    - ELEMENT_REGISTRY
                                    - FAILURE
                                    - METERING_REGISTRY
                                    - OPERATOR
                                    - ORDER
                                    - QUOTE
                                    - QUOTE_REQUEST
                                    - RECEIVED_QUOTE
                                    - RECEIVED_QUOTE_REQUEST
                                    - REQUEST
                                    - SELL_ORDER
                                    - SUPPLIER
                                    - SCHEDULE_WORK
                                    - WORK
                                  readOnly: true
                                file_label_id:
                                  description: File Label Id
                                  type:
                                    - integer
                                    - 'null'
                                name:
                                  description: File name
                                  type: string
                                  examples:
                                    - my_example_file
                                thumb:
                                  description: URL to the thumbnail, in case the File is an image.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                file_url:
                                  description: URL to the File
                                  type: string
                                  format: uri
                                  readOnly: true
                                description:
                                  type:
                                    - string
                                    - 'null'
                                expire_date:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T17:12:00.000Z'
                                has_reminder:
                                  type: boolean
                                  readOnly: true
                                file_type:
                                  description: Internal type of the file
                                  type: string
                                  enum:
                                    - cad
                                    - compressed
                                    - file
                                    - image
                                    - office
                                    - other
                                    - pdf
                                    - signature
                                    - video
                                  readOnly: true
                                permission_to_technician:
                                  type: boolean
                                  default: true
                                permission_to_manager:
                                  type: boolean
                                  default: true
                                permission_to_direct:
                                  type: boolean
                                  default: false
                                extension:
                                  type: string
                                  enum:
                                    - 3gp
                                    - 3gpp
                                    - bin
                                    - bmp
                                    - cad
                                    - csv
                                    - doc
                                    - docx
                                    - gif
                                    - jpeg
                                    - jpg
                                    - kmz
                                    - mov
                                    - mp4
                                    - odf
                                    - odp
                                    - pdf
                                    - png
                                    - ppt
                                    - pptx
                                    - qt
                                    - rar
                                    - txt
                                    - xls
                                    - xlsx
                                    - zip
                                  readOnly: true
                                network_status:
                                  description: Show the network status of the file.
                                  type: string
                                  enum:
                                    - SHARED
                                    - RECEIVED
                                    - NOT_SHARED
                                shared_with_supplier:
                                  description: Show if the file is currently in a shared status with the supplier.
                                  type: boolean
                                shared_with_client:
                                  description: Show if the file is currently in a shared status with the client.
                                  type: boolean
                                file_size:
                                  type: integer
                                  readOnly: true
                                created_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                  readOnly: true
                          required:
                            - id
                            - type
                            - attributes
                        - title: Quote
                          description: Quote model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Quote.
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - quote
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                quote_id:
                                  description: ID of the Quote.
                                  type: integer
                                  readOnly: true
                                quote_uuid:
                                  description: UUID of the Quote.
                                  type:
                                    - string
                                    - 'null'
                                  format: uuid
                                  readOnly: true
                                code:
                                  description: Code of the Quote. Visible on Infraspeak platform.
                                  type: integer
                                  readOnly: true
                                client_id:
                                  description: ID of the Client associated to the quote.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                state:
                                  description: State of the Quote.
                                  type: string
                                  enum:
                                    - DRAFT
                                    - READY
                                    - ACCEPTED
                                    - DECLINED
                                    - CANCELLED
                                    - CONVERTED_TO_SALE
                                  default: DRAFT
                                  examples:
                                    - DRAFT
                                entity_id:
                                  type: integer
                                  readOnly: true
                                created_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: Creation date of the Quote
                                      readOnly: true
                                created_by:
                                  description: ID of the operator that created the Quote.
                                  type: integer
                                  readOnly: true
                                started_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: Date when Quote has started.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                started_by:
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                ready_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: Date Quote is marked as Awaiting.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                ready_by_id:
                                  description: ID of the user who marked the quote as Awaiting.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                ready_by_type:
                                  description: Type of user who marked the Quote as Awaiting.
                                  type:
                                    - string
                                    - 'null'
                                  enum:
                                    - OPERATOR
                                    - CONTACT
                                    - null
                                  default: OPERATOR
                                accepted_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: Date Quote is accepted.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                accepted_by_id:
                                  description: ID of the user who accepted the Quote.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                accepted_by_type:
                                  description: Type of user who accepted the Quote.
                                  type:
                                    - string
                                    - 'null'
                                  enum:
                                    - OPERATOR
                                    - CONTACT
                                    - null
                                  default: OPERATOR
                                declined_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: Date Quote was declined.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                declined_by_id:
                                  description: ID of the user who declined the quote.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                declined_by_type:
                                  description: Type of user who declined the Quote.
                                  type:
                                    - string
                                    - 'null'
                                  enum:
                                    - OPERATOR
                                    - CONTACT
                                    - null
                                  default: OPERATOR
                                cancelled_by:
                                  description: ID of the user who cancelled the quote.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                cancelled_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: Date Quote was cancelled.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                last_sent_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: Date Quote was last sent.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                last_sent_by:
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                last_share_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: Date Quote was last shared.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                last_share_by:
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                converted_by:
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                converted_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: Date Quote was converted.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                description:
                                  description: Quote observations.
                                  type:
                                    - string
                                    - 'null'
                                internal_quote_id:
                                  description: Internal ID of the Quote.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                  examples:
                                    - FS-123
                                external_quote_id:
                                  description: External ID of the Quote.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                  examples:
                                    - FS-123
                                related_to_type:
                                  description: Type of object related to the quote.
                                  type:
                                    - string
                                    - 'null'
                                  enum:
                                    - FAILURE
                                    - SCHEDULED_WORK
                                    - null
                                  examples:
                                    - FAILURE
                                related_to_id:
                                  description: ID of the object (failure or scheduled work) related to the quote.
                                  type:
                                    - integer
                                    - 'null'
                                base_total:
                                  description: Total Base value of the Quote, without VAT and discount.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                discount_total:
                                  description: Total value of the discount applied to the Quote items.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                vat_total:
                                  description: Total value of the VAT applied to the Quote items.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                total:
                                  description: Total value of the Quote, considering the discount and VAT applied.
                                  type: integer
                                  readOnly: true
                                sell_order_id:
                                  description: ID of the Sale associated to the Quote, after converted.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                updated_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: Date Quote was updated.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                deleted_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: Date Quote was deleted.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                quote_request_id:
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                received_quote_request_id:
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                is_from_network:
                                  type: boolean
                                  readOnly: true
                                client_answer:
                                  type: object
                                  properties:
                                    clientUserName:
                                      type: string
                                    clientName:
                                      type: string
                                    answer:
                                      type: string
                            meta:
                              type: object
                              properties:
                                custom_fields:
                                  type:
                                    - object
                                    - 'null'
                                  additionalProperties:
                                    oneOf:
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - SELECT
                                            examples:
                                              - SELECT
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                option_id:
                                                  description: The ID of the selected option
                                                  type: integer
                                                  examples:
                                                    - 123
                                                option_code:
                                                  description: The code of the selected option
                                                  type:
                                                    - string
                                                    - 'null'
                                                  examples:
                                                    - OP01
                                                value:
                                                  description: The value of the selected option
                                                  type: string
                                                  examples:
                                                    - My Option 1
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field supports selecting multiple values
                                                    type: boolean
                                                    examples:
                                                      - true
                                                  managed_by_integrations:
                                                    description: >-
                                                      Indicates if the Custom Field options are only managed by
                                                      integrations
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - TEXT
                                            examples:
                                              - TEXT
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            examples:
                                              - abc
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (Empty for Custom Fields of
                                                  type TEXT)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - BOOLEAN
                                            examples:
                                              - BOOLEAN
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - boolean
                                              - 'null'
                                            examples:
                                              - true
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (There are none for the Custom
                                                  Field Boolean type)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - RELATIONSHIP
                                            examples:
                                              - RELATIONSHIP
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                related_to_type:
                                                  description: The type of object that is selected as the Custom Field Values
                                                  type: string
                                                  enum:
                                                    - CLIENT
                                                    - CONTACT
                                                  examples:
                                                    - CLIENT
                                                related_to_id:
                                                  description: The ID of object that is selected as the Custom Field Value
                                                  type: integer
                                                  examples:
                                                    - 123
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field allows multiple selection
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  relationship_object:
                                                    description: The type of object that is selected as the Custom Field Values
                                                    type: string
                                                    enum:
                                                      - CLIENT
                                                      - CONTACT
                                                    examples:
                                                      - CLIENT
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - DATETIME
                                            examples:
                                              - DATETIME
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-12-12 12:39:00'
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_past_dates:
                                                    description: Indicates if this Custom Field support past dates
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  allow_future_dates:
                                                    description: Indicates if this Custom Field support future dates
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - NUMBER
                                            examples:
                                              - NUMBER
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - integer
                                              - 'null'
                                            examples:
                                              - 12
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  min:
                                                    description: Indicates the minimum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 1
                                                  max:
                                                    description: Indicates the maximum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 3
                                    discriminator:
                                      propertyName: field_type
                        - title: Scheduled Work
                          description: Scheduled Order model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Scheduled Order
                              type: string
                              readOnly: true
                              examples:
                                - '123'
                            type:
                              description: Model type
                              type: string
                              enum:
                                - scheduled_work
                              readOnly: true
                              examples:
                                - scheduled_work
                            attributes:
                              type: object
                              properties:
                                entity_id:
                                  description: The ID of the Entity where the Scheduled Work belongs.
                                  type: integer
                                  examples:
                                    - 123
                                complete_date:
                                  description: The datetime when the Scheduled Work was completed
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  examples:
                                    - '2014-09-01 02:22:00'
                                cost_center_name:
                                  description: The name of the Cost Center associated with the Scheduled Work.
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - abc
                                completed_by_id:
                                  description: The ID of the Operator that completed the Scheduled Work.
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 123
                                completed_percentage:
                                  description: The percentage of the Scheduled Work that is completed.
                                  type: integer
                                  examples:
                                    - 45
                                completed_date:
                                  description: The datetime when the Scheduled Work was completed
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  examples:
                                    - '2014-09-01 02:22:00'
                                confirmed:
                                  description: Indicates if the Scheduled Work is confirmed.
                                  type: boolean
                                  examples:
                                    - true
                                failure_id:
                                  description: >-
                                    The ID of the Failure / Work Order associated with the Scheduled Work (Only if the
                                    Scheduled work originated from a Failure / Work Order)
                                  type:
                                    - integer
                                    - 'null'
                                last_status_change_date:
                                  description: The datetime when the Scheduled Work status changed for the last time
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  examples:
                                    - '2014-09-01 02:22:00'
                                last_status_change_operator:
                                  description: The name of the Operator that changed the Scheduled Work status for the last time
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - John
                                manpower_duration:
                                  description: The total manpower duration of the Scheduled work in ISO-8601 duration format.
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - P0Y0M0DT0H1M19S
                                manpower_cost:
                                  description: The total manpower cost of the Scheduled work in the currency of the logged in user.
                                  type:
                                    - number
                                    - 'null'
                                  examples:
                                    - 12.5
                                observation:
                                  description: Observations added to the Scheduled Work.
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - abc
                                real_start_date:
                                  description: >-
                                    The datetime when the Scheduled Work was actually started (not to confuse with the
                                    datetime when the Scheduled work planned to start)
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  examples:
                                    - '2014-09-01 02:22:00'
                                running:
                                  description: Indicates if the Scheduled Work is currently in a running status
                                  type: boolean
                                  examples:
                                    - true
                                schedule_work_id:
                                  description: The ID of the Scheduled Work
                                  type: integer
                                  examples:
                                    - 123
                                signature_status:
                                  description: Indicates if the Scheduled Work is signed by a responsible.
                                  type: string
                                  enum:
                                    - NOT_SIGNED
                                    - SIGNED
                                  examples:
                                    - NOT_SIGNED
                                start_date:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: The datetime when the Scheduled Work is/was planned to start
                                started_by_id:
                                  description: The ID of the Operator that started the Scheduled Work.
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 123
                                state:
                                  description: The current state of the Scheduled Work.
                                  type: string
                                  enum:
                                    - SCHEDULED
                                    - RUNNING
                                    - PAUSED
                                    - COMPLETED
                                    - CANCELED
                                    - ARCHIVED
                                    - COMPLETED_CANCELED
                                  examples:
                                    - COMPLETED
                                time_running:
                                  description: The current running duration of the Scheduled work in ISO-8601 duration format.
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - P0Y0M0DT0H1M19S
                                visit:
                                  description: >-
                                    Indicates the position/step of the Scheduled work in the parent Work / Planned Job
                                    that is originates from (e.g. can be the first Scheduled Work of the Work / Planned
                                    Job, the second, and so on)
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 1
                                work_id:
                                  description: The ID of the parent Work / Planned Job
                                  type: integer
                                  examples:
                                    - 123
                                next_sla_date:
                                  description: >
                                    The datetime of the closest SLA that is still ongoing in the Scheduled Work

                                    (This field includes only SLAs that have not finished yet and are still ongoing, and
                                    will be null if there's none)
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  examples:
                                    - '2014-09-01 02:22:00'
                                next_sla_percentage:
                                  description: >
                                    The percentage of the Scheduled Work tasks that are completed in the closest SLA
                                    that is still ongoing

                                    (This field includes only SLAs that have not finished yet and are still ongoing, and
                                    will be null if there's none)
                                  type:
                                    - number
                                    - 'null'
                                  examples:
                                    - 75.5
                                next_scheduled_work_sla_id:
                                  description: >
                                    The ID of the next SLA

                                    (This field includes the next SLA, despite his current status being already finished
                                    or paused)
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 123
                                next_scheduled_work_sla_date:
                                  description: >
                                    The datetime of the next SLA

                                    (This field includes the next SLA, despite his current status being already finished
                                    or paused)
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  examples:
                                    - '2014-09-01 02:22:00'
                                next_scheduled_work_sla_status_order:
                                  description: >
                                    The status order of the next SLA

                                    (0 if status is 'RUNNING', 1 if status is 'PAUSED', 2 if status is 'FINISHED',
                                    otherwise 3)

                                    (This field includes the next SLA, despite his current status being already finished
                                    or paused)
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 0
                                rescheduled_by_user:
                                  description: Indicates if the Scheduled Work was manually rescheduled by an User
                                  type: boolean
                                  examples:
                                    - false
                                network_id:
                                  description: ID used to reference a shared Planned Job Order
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 123
                                updated_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: The datetime of the last update in the Scheduled Work
                                display_start_date:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: The start datetime to display in the Scheduled Work
                                      type:
                                        - string
                                        - 'null'
                                display_complete_date:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: The complete datetime to display in the Scheduled Work
                                      type:
                                        - string
                                        - 'null'
                                estimated_duration_absolute_deviation:
                                  description: >-
                                    The absolute deviation between the actual manpower duration and the estimated task
                                    time in the Scheduled Work, representing the total difference regardless of whether
                                    the estimate was over or under
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 150
                                estimated_duration_relative_deviation:
                                  description: >-
                                    The relative deviation between the actual manpower duration and the estimated task
                                    time in the Scheduled Work. A negative value indicates the estimate was too low,
                                    while a positive value indicates it was too high
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - -150
                                pause_reason_id:
                                  description: The ID of the Pause Reason associated with the Scheduled Work
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 123
                                last_status_description:
                                  description: A description provided when the last status change occurred on the Scheduled Work
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - Waiting for spare parts delivery
                            relationships:
                              description: The relationships of the Scheduled Work (Only present when expanded in the request)
                              type: object
                              properties:
                                auditStats:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - audit_stats
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                buyOrders:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - buy_order
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                client:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - client
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                completedBy:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                elementRegistries:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - element_registry
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                entity:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - entity
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                events:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - event
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                eventsPlanned:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - event
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                files:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - file
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                gatekeeperAnswerRegistries:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - gatekeeper_answer_registry
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                networkStatus:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            description: >-
                                              If RECEIVER the Scheduled Work was received on Network, if SENDER the
                                              Scheduled Work was sent to the Network.
                                            type: string
                                            enum:
                                              - SENDER
                                              - RECEIVER
                                            readOnly: true
                                          action:
                                            description: >-
                                              If UNSHARED, the Scheduled Work was unshared from Network, if null, no
                                              action was taken.
                                            type: string
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                          in_sync:
                                            description: If the Scheduled Work is in sync of execution with the Network.
                                            type: boolean
                                            readOnly: true
                                          network_entity_uuid:
                                            description: >-
                                              The UUID of the Network Entity related to the Scheduled Work network
                                              status.
                                            type: string
                                            readOnly: true
                                          network_relation_id:
                                            description: >-
                                              The ID of the Network Relation related to the Scheduled Work network
                                              status. It can be from a Client or a Supplier.
                                            type: integer
                                            readOnly: true
                                          network_relation_type:
                                            description: >-
                                              The type of Network Relation related to the Scheduled Work network status.
                                              It can be from a Client or a Supplier, used to identify the relation ID
                                              and the relation the Network Entity has to the Scheduled Work.
                                            type: string
                                            enum:
                                              - CLIENT
                                              - SUPPLIER
                                            readOnly: true
                                          shared:
                                            description: If the Scheduled Work is actively shared on Network.
                                            type: boolean
                                            readOnly: true
                                otherCosts:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - other-cost
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                participants:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - operator
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                pausedBy:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                reminderRules:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - reminder_rules
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                reminders:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - reminder
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                requests:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - request
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                scheduledWorkSlas:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - schedule_work_sla
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                startedBy:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                stock:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - stock
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                stockTasks:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - stock
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                survey:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - survey
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                surveyFeedbacks:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - survey_feedback
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                work:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - work
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                realStartDateEditedBy:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                completeDateEditedBy:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                failureScheduleMapping:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - failure_schedule_mapping
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                pause_reason:
                                  description: The Pause Reason associated with the Scheduled Work
                                  type: object
                                  properties:
                                    data:
                                      type:
                                        - object
                                        - 'null'
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - pause_reason
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                assignees:
                                  description: The Operators and Teams assigned to the Scheduled Work
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - scheduled_work_assignee
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                          required:
                            - id
                            - type
                            - attributes
                    uniqueItems: true
                  meta:
                    title: Meta
                    description: Meta model structure details
                    type: object
                    properties:
                      cost_centers:
                        type: object
                        properties:
                          names:
                            type: array
                            items:
                              type: string
                            examples:
                              - - Cost center
                                - Cost center 2
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /sales/sell-orders/{sellOrderId}:
    get:
      operationId: getSellOrder
      tags:
        - Sell Orders
      summary: Get a Sell Order (Sale)
      description: This endpoint allows you to get a specific Sell Order (Sale).
      parameters:
        - name: sellOrderId
          in: path
          description: The Sell Order (Sale) ID
          required: true
          schema:
            type: string
        - name: expanded
          in: query
          description: |
            This parameter allows to expand the resulting Sell Orders (Sales) relationships in the response.
          schema:
            type: string
            enum:
              - entity
              - createdBy
              - cancelledBy
              - completedBy
              - startedBy
              - client
              - contacts
              - failure
              - files
              - quote
              - scheduledWork
              - confirmedBy
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: Sell Order (Sale)
                    description: |
                      Sell Order (Sale) Resource structure details.
                    type: object
                    properties:
                      id:
                        description: ID for the Sell Order (Sale) in Infraspeak.
                        type: string
                        examples:
                          - '123'
                        readOnly: true
                      type:
                        description: Resource type
                        type: string
                        enum:
                          - sell_order
                        examples:
                          - sell_order
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          client_id:
                            description: |
                              ID of the client associated with the Sell Order (Sale).

                              **This field is required if `related_to_type` and `related_to_id` are not filled.**
                            type: integer
                            examples:
                              - 123
                          code:
                            description: Code used to identify the Sell Order (Sale) in Infraspeak.
                            type: integer
                            examples:
                              - 123
                            readOnly: true
                          sell_order_uuid:
                            description: Universally Unique Identifier (UUID) for the Sell Order (Sale).
                            type: string
                            format: uuid
                            examples:
                              - 3ac7648a-d628-47d8-b9a5-bf6c5edfe176
                            readOnly: true
                          state:
                            description: |
                              Current State for the Sell Order (Sale).

                              Possible states for a Sell Order (Sale) in Infraspeak are:
                              - `DRAFT`
                              - `CANCELLED`
                              - `RUNNING`
                              - `COMPLETED`
                              - `COMPLETED_CONFIRMED`
                            type: string
                            enum:
                              - DRAFT
                              - CANCELLED
                              - RUNNING
                              - COMPLETED
                              - COMPLETED_CONFIRMED
                            examples:
                              - DRAFT
                          entity_id:
                            description: |
                              ID for the Entity this Sell Order (Sale) belongs to in Infraspeak.
                            type: integer
                            examples:
                              - 123
                            readOnly: true
                          created_at:
                            description: Creation date of the Sell Order (Sale).
                            type: string
                            format: date-time
                            examples:
                              - '2020-08-28 08:48:00'
                            readOnly: true
                          created_by:
                            description: ID for the Operator who created the Sell Order (Sale).
                            type: integer
                            examples:
                              - 123
                          started_at:
                            description: Date indicating when the Sell Order (Sale) was Started (state 'RUNNING').
                            type:
                              - string
                              - 'null'
                            format: date-time
                            examples:
                              - '2020-08-28T08:48:00.000Z'
                            readOnly: true
                          started_by:
                            description: ID for the Operator who started the Sell Order (Sale).
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 123
                          completed_at:
                            description: Date indicating when the Sell Order (Sale) was Completed (state 'COMPLETED').
                            type:
                              - string
                              - 'null'
                            format: date-time
                            examples:
                              - '2020-08-28T08:48:00.000Z'
                            readOnly: true
                          completed_by:
                            description: ID for the Operator who completed the Sell Order (Sale).
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 123
                          cancelled_at:
                            description: Date indicating when the Sell Order (Sale) was Cancelled (state 'CANCELED').
                            type:
                              - string
                              - 'null'
                            format: date-time
                            examples:
                              - '2020-08-28T08:48:00.000Z'
                            readOnly: true
                          cancelled_by:
                            description: ID for the Operator that cancelled the Sell Order (Sale).
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 123
                          description:
                            description: >
                              Observations or notes for the Sell Order (Sale).


                              This field is a free text input that holds any information regarding the Sell Order
                              (Sale), filled by the user.
                            type:
                              - string
                              - 'null'
                            examples:
                              - Some information regarding the sell Order (Sale)
                          internal_sale_id:
                            description: |
                              Internal ID of the Sell Order (Sale).
                            type:
                              - string
                              - 'null'
                            examples:
                              - '123'
                          external_sale_id:
                            description: >
                              External ID of the associated Sell Order (Sale).


                              Usually used to identify the Sell Order (Sale) with an unique identifier from a
                              third-party application.
                            type:
                              - string
                              - 'null'
                            examples:
                              - 1e29e166-c6b8-4686-8856-2090d8dc12e1
                          related_to_type:
                            description: |
                              Type of the Infraspeak Object related to the Sell Order (Sale).

                              **This is required when the field `related_to_id` is filled.**

                              Allowed values for this field are:
                              - `FAILURE` (Work Order)
                              - `SCHEDULED_WORK` (Planned Job Order)
                            type:
                              - string
                              - 'null'
                            enum:
                              - FAILURE
                              - SCHEDULED_WORK
                            examples:
                              - FAILURE
                          related_to_id:
                            description: |
                              ID for the Infraspeak Object related to the Sell Order (Sale).

                              **This is required when the field `related_to_type` is filled.**

                              Possible related objects to a Sell Order (Sale) are:
                              - `FAILURE` (Work Order)
                              - `SCHEDULED_WORK` (Planned Job Order)
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 123
                          quote_id:
                            description: ID of the Quote that originated the Sell Order (Sale).
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 123
                          base_total:
                            description: |
                              Total Base Price for the Sell Order (Sale).

                              **This does not include Taxes or Discounts.**
                            type: number
                            examples:
                              - 11.22
                          discount_total:
                            description: |
                              Discount total for the Sell Order (Sale).
                            type: number
                            examples:
                              - 0.22
                          vat_total:
                            description: |
                              Taxes total for the Sell Order (Sale).
                            type: number
                            examples:
                              - 1
                          total:
                            description: |
                              Total Price for the Sell Order (Sale) including Taxes and Discounts.
                            type: number
                            examples:
                              - 12
                          updated_at:
                            description: Date for the last change in the Sell Order (Sale).
                            type: string
                            format: date-time
                            examples:
                              - '2020-08-28T13:05:00.000Z'
                            readOnly: true
                          confirmed_by:
                            description: ID for the Operator that confirmed the Sell Order (Sale).
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 123
                          confirmed_at:
                            description: Date indicating when the Operator confirmed the Sell Order (Sale).
                            type: string
                            format: date-time
                            examples:
                              - '2024-08-28T16:05:00.000Z'
                      meta:
                        type: object
                        properties:
                          custom_fields:
                            type:
                              - object
                              - 'null'
                            additionalProperties:
                              oneOf:
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - SELECT
                                      examples:
                                        - SELECT
                                    value:
                                      description: The current values of the Custom Field in this resource
                                      type:
                                        - array
                                        - 'null'
                                      items:
                                        type: object
                                        properties:
                                          option_id:
                                            description: The ID of the selected option
                                            type: integer
                                            examples:
                                              - 123
                                          option_code:
                                            description: The code of the selected option
                                            type:
                                              - string
                                              - 'null'
                                            examples:
                                              - OP01
                                          value:
                                            description: The value of the selected option
                                            type: string
                                            examples:
                                              - My Option 1
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: The type settings for the Custom Field
                                          type: object
                                          properties:
                                            allow_multiple_selection:
                                              description: Indicates if the Custom Field supports selecting multiple values
                                              type: boolean
                                              examples:
                                                - true
                                            managed_by_integrations:
                                              description: Indicates if the Custom Field options are only managed by integrations
                                              type: boolean
                                              examples:
                                                - true
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - TEXT
                                      examples:
                                        - TEXT
                                    value:
                                      description: The current value of the Custom Field in this resource
                                      type:
                                        - string
                                        - 'null'
                                      examples:
                                        - abc
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: >-
                                            The type settings for the Custom Field (Empty for Custom Fields of type
                                            TEXT)
                                          type: object
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - BOOLEAN
                                      examples:
                                        - BOOLEAN
                                    value:
                                      description: The current value of the Custom Field in this resource
                                      type:
                                        - boolean
                                        - 'null'
                                      examples:
                                        - true
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: >-
                                            The type settings for the Custom Field (There are none for the Custom Field
                                            Boolean type)
                                          type: object
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - RELATIONSHIP
                                      examples:
                                        - RELATIONSHIP
                                    value:
                                      description: The current values of the Custom Field in this resource
                                      type:
                                        - array
                                        - 'null'
                                      items:
                                        type: object
                                        properties:
                                          related_to_type:
                                            description: The type of object that is selected as the Custom Field Values
                                            type: string
                                            enum:
                                              - CLIENT
                                              - CONTACT
                                            examples:
                                              - CLIENT
                                          related_to_id:
                                            description: The ID of object that is selected as the Custom Field Value
                                            type: integer
                                            examples:
                                              - 123
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: The type settings for the Custom Field
                                          type: object
                                          properties:
                                            allow_multiple_selection:
                                              description: Indicates if the Custom Field allows multiple selection
                                              type: boolean
                                              examples:
                                                - false
                                            relationship_object:
                                              description: The type of object that is selected as the Custom Field Values
                                              type: string
                                              enum:
                                                - CLIENT
                                                - CONTACT
                                              examples:
                                                - CLIENT
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - DATETIME
                                      examples:
                                        - DATETIME
                                    value:
                                      description: The current value of the Custom Field in this resource
                                      type:
                                        - string
                                        - 'null'
                                      format: date-time
                                      examples:
                                        - '2025-12-12 12:39:00'
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: The type settings for the Custom Field
                                          type: object
                                          properties:
                                            allow_past_dates:
                                              description: Indicates if this Custom Field support past dates
                                              type: boolean
                                              examples:
                                                - false
                                            allow_future_dates:
                                              description: Indicates if this Custom Field support future dates
                                              type: boolean
                                              examples:
                                                - true
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - NUMBER
                                      examples:
                                        - NUMBER
                                    value:
                                      description: The current value of the Custom Field in this resource
                                      type:
                                        - integer
                                        - 'null'
                                      examples:
                                        - 12
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: The type settings for the Custom Field
                                          type: object
                                          properties:
                                            min:
                                              description: Indicates the minimum value for the Custom Field
                                              type:
                                                - integer
                                                - 'null'
                                              examples:
                                                - 1
                                            max:
                                              description: Indicates the maximum value for the Custom Field
                                              type:
                                                - integer
                                                - 'null'
                                              examples:
                                                - 3
                              discriminator:
                                propertyName: field_type
                  included:
                    description: >
                      List of expanded relationships for the Sell Order (Sale).


                      Items available in this list will vary depending on the value supplied in `expanded` query
                      parameter.
                    type: array
                    items:
                      anyOf:
                        - title: Entity
                          description: Entity model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Supplier
                              type: string
                              examples:
                                - '1'
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - entity
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                entity_id:
                                  type: integer
                                name:
                                  type: string
                                email:
                                  type: string
                                site:
                                  type: string
                                phone:
                                  type: string
                                cellphone:
                                  type: string
                                address:
                                  type: string
                                nib:
                                  type: string
                                nif:
                                  type: string
                                report_email:
                                  type: string
                                language:
                                  type: string
                                currency:
                                  type: string
                                license:
                                  type: string
                                  enum:
                                    - ASSISTANCE
                                    - CHURNED
                                    - COMPLEX
                                    - CSENTITY
                                    - DISTRIBUTED
                                    - HOTEL
                                    - NONE
                                    - PARTNER
                                    - PLACECHECKUP
                                profile_picture:
                                  type: string
                                entity_uuid:
                                  type: string
                                vat_rate:
                                  type: number
                                colour:
                                  type: string
                        - title: Operator
                          description: Operator model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Operator
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - operator
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                operator_id:
                                  description: ID of the Operator
                                  type: integer
                                  readOnly: true
                                operator_uuid:
                                  description: Uuid of the Operator
                                  type: string
                                  format: uuid
                                  readOnly: true
                                full_name:
                                  type: string
                                email:
                                  type: string
                                  format: email
                                phone:
                                  type:
                                    - string
                                    - 'null'
                                cellphone:
                                  type:
                                    - string
                                    - 'null'
                                account:
                                  description: Type of account which determines the access permission level.
                                  type: string
                                  enum:
                                    - admin
                                    - manager
                                    - technician
                                    - operator
                                    - reporter
                                language:
                                  type: string
                                  enum:
                                    - ar
                                    - ca
                                    - da_dk
                                    - en
                                    - es
                                    - fr_fr
                                    - pl_pl
                                    - pt_br
                                    - pt_pt
                                    - ko
                                    - zh_cn
                                    - nl_nl
                                    - de_de
                                cost_per_hour:
                                  type: number
                                  minimum: 0
                                  examples:
                                    - 10
                                warehouse_id:
                                  description: ID of the warehouse associated to the Operator by default.
                                  type: integer
                                entity_id:
                                  type: integer
                                  readOnly: true
                                timezone:
                                  description: >
                                    Valid PHP timezone identifier. See the full list here:
                                    https://www.php.net/manual/en/timezones.php.
                                  type: string
                                  examples:
                                    - Europe/Lisbon
                                is_from_network:
                                  type: boolean
                                created_at:
                                  type: string
                                  format: date-time
                                phone_country_code:
                                  type: string
                                  examples:
                                    - US
                                is_first_web_login:
                                  type:
                                    - boolean
                                    - 'null'
                                  readOnly: true
                                status:
                                  type: string
                                  enum:
                                    - WORKING
                                    - AVAILABLE
                                    - OFFLINE
                                  examples:
                                    - WORKING
                            meta:
                              type: object
                              properties:
                                custom_fields:
                                  type:
                                    - object
                                    - 'null'
                                  additionalProperties:
                                    oneOf:
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - SELECT
                                            examples:
                                              - SELECT
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                option_id:
                                                  description: The ID of the selected option
                                                  type: integer
                                                  examples:
                                                    - 123
                                                option_code:
                                                  description: The code of the selected option
                                                  type:
                                                    - string
                                                    - 'null'
                                                  examples:
                                                    - OP01
                                                value:
                                                  description: The value of the selected option
                                                  type: string
                                                  examples:
                                                    - My Option 1
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field supports selecting multiple values
                                                    type: boolean
                                                    examples:
                                                      - true
                                                  managed_by_integrations:
                                                    description: >-
                                                      Indicates if the Custom Field options are only managed by
                                                      integrations
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - TEXT
                                            examples:
                                              - TEXT
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            examples:
                                              - abc
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (Empty for Custom Fields of
                                                  type TEXT)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - BOOLEAN
                                            examples:
                                              - BOOLEAN
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - boolean
                                              - 'null'
                                            examples:
                                              - true
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (There are none for the Custom
                                                  Field Boolean type)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - RELATIONSHIP
                                            examples:
                                              - RELATIONSHIP
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                related_to_type:
                                                  description: The type of object that is selected as the Custom Field Values
                                                  type: string
                                                  enum:
                                                    - CLIENT
                                                    - CONTACT
                                                  examples:
                                                    - CLIENT
                                                related_to_id:
                                                  description: The ID of object that is selected as the Custom Field Value
                                                  type: integer
                                                  examples:
                                                    - 123
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field allows multiple selection
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  relationship_object:
                                                    description: The type of object that is selected as the Custom Field Values
                                                    type: string
                                                    enum:
                                                      - CLIENT
                                                      - CONTACT
                                                    examples:
                                                      - CLIENT
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - DATETIME
                                            examples:
                                              - DATETIME
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-12-12 12:39:00'
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_past_dates:
                                                    description: Indicates if this Custom Field support past dates
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  allow_future_dates:
                                                    description: Indicates if this Custom Field support future dates
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - NUMBER
                                            examples:
                                              - NUMBER
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - integer
                                              - 'null'
                                            examples:
                                              - 12
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  min:
                                                    description: Indicates the minimum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 1
                                                  max:
                                                    description: Indicates the maximum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 3
                                    discriminator:
                                      propertyName: field_type
                        - title: Operator
                          description: Operator model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Operator
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - operator
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                operator_id:
                                  description: ID of the Operator
                                  type: integer
                                  readOnly: true
                                operator_uuid:
                                  description: Uuid of the Operator
                                  type: string
                                  format: uuid
                                  readOnly: true
                                full_name:
                                  type: string
                                email:
                                  type: string
                                  format: email
                                phone:
                                  type:
                                    - string
                                    - 'null'
                                cellphone:
                                  type:
                                    - string
                                    - 'null'
                                account:
                                  description: Type of account which determines the access permission level.
                                  type: string
                                  enum:
                                    - admin
                                    - manager
                                    - technician
                                    - operator
                                    - reporter
                                language:
                                  type: string
                                  enum:
                                    - ar
                                    - ca
                                    - da_dk
                                    - en
                                    - es
                                    - fr_fr
                                    - pl_pl
                                    - pt_br
                                    - pt_pt
                                    - ko
                                    - zh_cn
                                    - nl_nl
                                    - de_de
                                cost_per_hour:
                                  type: number
                                  minimum: 0
                                  examples:
                                    - 10
                                warehouse_id:
                                  description: ID of the warehouse associated to the Operator by default.
                                  type: integer
                                entity_id:
                                  type: integer
                                  readOnly: true
                                timezone:
                                  description: >
                                    Valid PHP timezone identifier. See the full list here:
                                    https://www.php.net/manual/en/timezones.php.
                                  type: string
                                  examples:
                                    - Europe/Lisbon
                                is_from_network:
                                  type: boolean
                                created_at:
                                  type: string
                                  format: date-time
                                phone_country_code:
                                  type: string
                                  examples:
                                    - US
                                is_first_web_login:
                                  type:
                                    - boolean
                                    - 'null'
                                  readOnly: true
                                status:
                                  type: string
                                  enum:
                                    - WORKING
                                    - AVAILABLE
                                    - OFFLINE
                                  examples:
                                    - WORKING
                            meta:
                              type: object
                              properties:
                                custom_fields:
                                  type:
                                    - object
                                    - 'null'
                                  additionalProperties:
                                    oneOf:
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - SELECT
                                            examples:
                                              - SELECT
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                option_id:
                                                  description: The ID of the selected option
                                                  type: integer
                                                  examples:
                                                    - 123
                                                option_code:
                                                  description: The code of the selected option
                                                  type:
                                                    - string
                                                    - 'null'
                                                  examples:
                                                    - OP01
                                                value:
                                                  description: The value of the selected option
                                                  type: string
                                                  examples:
                                                    - My Option 1
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field supports selecting multiple values
                                                    type: boolean
                                                    examples:
                                                      - true
                                                  managed_by_integrations:
                                                    description: >-
                                                      Indicates if the Custom Field options are only managed by
                                                      integrations
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - TEXT
                                            examples:
                                              - TEXT
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            examples:
                                              - abc
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (Empty for Custom Fields of
                                                  type TEXT)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - BOOLEAN
                                            examples:
                                              - BOOLEAN
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - boolean
                                              - 'null'
                                            examples:
                                              - true
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (There are none for the Custom
                                                  Field Boolean type)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - RELATIONSHIP
                                            examples:
                                              - RELATIONSHIP
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                related_to_type:
                                                  description: The type of object that is selected as the Custom Field Values
                                                  type: string
                                                  enum:
                                                    - CLIENT
                                                    - CONTACT
                                                  examples:
                                                    - CLIENT
                                                related_to_id:
                                                  description: The ID of object that is selected as the Custom Field Value
                                                  type: integer
                                                  examples:
                                                    - 123
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field allows multiple selection
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  relationship_object:
                                                    description: The type of object that is selected as the Custom Field Values
                                                    type: string
                                                    enum:
                                                      - CLIENT
                                                      - CONTACT
                                                    examples:
                                                      - CLIENT
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - DATETIME
                                            examples:
                                              - DATETIME
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-12-12 12:39:00'
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_past_dates:
                                                    description: Indicates if this Custom Field support past dates
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  allow_future_dates:
                                                    description: Indicates if this Custom Field support future dates
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - NUMBER
                                            examples:
                                              - NUMBER
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - integer
                                              - 'null'
                                            examples:
                                              - 12
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  min:
                                                    description: Indicates the minimum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 1
                                                  max:
                                                    description: Indicates the maximum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 3
                                    discriminator:
                                      propertyName: field_type
                        - title: Operator
                          description: Operator model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Operator
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - operator
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                operator_id:
                                  description: ID of the Operator
                                  type: integer
                                  readOnly: true
                                operator_uuid:
                                  description: Uuid of the Operator
                                  type: string
                                  format: uuid
                                  readOnly: true
                                full_name:
                                  type: string
                                email:
                                  type: string
                                  format: email
                                phone:
                                  type:
                                    - string
                                    - 'null'
                                cellphone:
                                  type:
                                    - string
                                    - 'null'
                                account:
                                  description: Type of account which determines the access permission level.
                                  type: string
                                  enum:
                                    - admin
                                    - manager
                                    - technician
                                    - operator
                                    - reporter
                                language:
                                  type: string
                                  enum:
                                    - ar
                                    - ca
                                    - da_dk
                                    - en
                                    - es
                                    - fr_fr
                                    - pl_pl
                                    - pt_br
                                    - pt_pt
                                    - ko
                                    - zh_cn
                                    - nl_nl
                                    - de_de
                                cost_per_hour:
                                  type: number
                                  minimum: 0
                                  examples:
                                    - 10
                                warehouse_id:
                                  description: ID of the warehouse associated to the Operator by default.
                                  type: integer
                                entity_id:
                                  type: integer
                                  readOnly: true
                                timezone:
                                  description: >
                                    Valid PHP timezone identifier. See the full list here:
                                    https://www.php.net/manual/en/timezones.php.
                                  type: string
                                  examples:
                                    - Europe/Lisbon
                                is_from_network:
                                  type: boolean
                                created_at:
                                  type: string
                                  format: date-time
                                phone_country_code:
                                  type: string
                                  examples:
                                    - US
                                is_first_web_login:
                                  type:
                                    - boolean
                                    - 'null'
                                  readOnly: true
                                status:
                                  type: string
                                  enum:
                                    - WORKING
                                    - AVAILABLE
                                    - OFFLINE
                                  examples:
                                    - WORKING
                            meta:
                              type: object
                              properties:
                                custom_fields:
                                  type:
                                    - object
                                    - 'null'
                                  additionalProperties:
                                    oneOf:
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - SELECT
                                            examples:
                                              - SELECT
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                option_id:
                                                  description: The ID of the selected option
                                                  type: integer
                                                  examples:
                                                    - 123
                                                option_code:
                                                  description: The code of the selected option
                                                  type:
                                                    - string
                                                    - 'null'
                                                  examples:
                                                    - OP01
                                                value:
                                                  description: The value of the selected option
                                                  type: string
                                                  examples:
                                                    - My Option 1
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field supports selecting multiple values
                                                    type: boolean
                                                    examples:
                                                      - true
                                                  managed_by_integrations:
                                                    description: >-
                                                      Indicates if the Custom Field options are only managed by
                                                      integrations
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - TEXT
                                            examples:
                                              - TEXT
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            examples:
                                              - abc
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (Empty for Custom Fields of
                                                  type TEXT)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - BOOLEAN
                                            examples:
                                              - BOOLEAN
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - boolean
                                              - 'null'
                                            examples:
                                              - true
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (There are none for the Custom
                                                  Field Boolean type)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - RELATIONSHIP
                                            examples:
                                              - RELATIONSHIP
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                related_to_type:
                                                  description: The type of object that is selected as the Custom Field Values
                                                  type: string
                                                  enum:
                                                    - CLIENT
                                                    - CONTACT
                                                  examples:
                                                    - CLIENT
                                                related_to_id:
                                                  description: The ID of object that is selected as the Custom Field Value
                                                  type: integer
                                                  examples:
                                                    - 123
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field allows multiple selection
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  relationship_object:
                                                    description: The type of object that is selected as the Custom Field Values
                                                    type: string
                                                    enum:
                                                      - CLIENT
                                                      - CONTACT
                                                    examples:
                                                      - CLIENT
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - DATETIME
                                            examples:
                                              - DATETIME
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-12-12 12:39:00'
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_past_dates:
                                                    description: Indicates if this Custom Field support past dates
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  allow_future_dates:
                                                    description: Indicates if this Custom Field support future dates
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - NUMBER
                                            examples:
                                              - NUMBER
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - integer
                                              - 'null'
                                            examples:
                                              - 12
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  min:
                                                    description: Indicates the minimum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 1
                                                  max:
                                                    description: Indicates the maximum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 3
                                    discriminator:
                                      propertyName: field_type
                        - title: Operator
                          description: Operator model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Operator
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - operator
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                operator_id:
                                  description: ID of the Operator
                                  type: integer
                                  readOnly: true
                                operator_uuid:
                                  description: Uuid of the Operator
                                  type: string
                                  format: uuid
                                  readOnly: true
                                full_name:
                                  type: string
                                email:
                                  type: string
                                  format: email
                                phone:
                                  type:
                                    - string
                                    - 'null'
                                cellphone:
                                  type:
                                    - string
                                    - 'null'
                                account:
                                  description: Type of account which determines the access permission level.
                                  type: string
                                  enum:
                                    - admin
                                    - manager
                                    - technician
                                    - operator
                                    - reporter
                                language:
                                  type: string
                                  enum:
                                    - ar
                                    - ca
                                    - da_dk
                                    - en
                                    - es
                                    - fr_fr
                                    - pl_pl
                                    - pt_br
                                    - pt_pt
                                    - ko
                                    - zh_cn
                                    - nl_nl
                                    - de_de
                                cost_per_hour:
                                  type: number
                                  minimum: 0
                                  examples:
                                    - 10
                                warehouse_id:
                                  description: ID of the warehouse associated to the Operator by default.
                                  type: integer
                                entity_id:
                                  type: integer
                                  readOnly: true
                                timezone:
                                  description: >
                                    Valid PHP timezone identifier. See the full list here:
                                    https://www.php.net/manual/en/timezones.php.
                                  type: string
                                  examples:
                                    - Europe/Lisbon
                                is_from_network:
                                  type: boolean
                                created_at:
                                  type: string
                                  format: date-time
                                phone_country_code:
                                  type: string
                                  examples:
                                    - US
                                is_first_web_login:
                                  type:
                                    - boolean
                                    - 'null'
                                  readOnly: true
                                status:
                                  type: string
                                  enum:
                                    - WORKING
                                    - AVAILABLE
                                    - OFFLINE
                                  examples:
                                    - WORKING
                            meta:
                              type: object
                              properties:
                                custom_fields:
                                  type:
                                    - object
                                    - 'null'
                                  additionalProperties:
                                    oneOf:
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - SELECT
                                            examples:
                                              - SELECT
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                option_id:
                                                  description: The ID of the selected option
                                                  type: integer
                                                  examples:
                                                    - 123
                                                option_code:
                                                  description: The code of the selected option
                                                  type:
                                                    - string
                                                    - 'null'
                                                  examples:
                                                    - OP01
                                                value:
                                                  description: The value of the selected option
                                                  type: string
                                                  examples:
                                                    - My Option 1
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field supports selecting multiple values
                                                    type: boolean
                                                    examples:
                                                      - true
                                                  managed_by_integrations:
                                                    description: >-
                                                      Indicates if the Custom Field options are only managed by
                                                      integrations
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - TEXT
                                            examples:
                                              - TEXT
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            examples:
                                              - abc
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (Empty for Custom Fields of
                                                  type TEXT)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - BOOLEAN
                                            examples:
                                              - BOOLEAN
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - boolean
                                              - 'null'
                                            examples:
                                              - true
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (There are none for the Custom
                                                  Field Boolean type)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - RELATIONSHIP
                                            examples:
                                              - RELATIONSHIP
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                related_to_type:
                                                  description: The type of object that is selected as the Custom Field Values
                                                  type: string
                                                  enum:
                                                    - CLIENT
                                                    - CONTACT
                                                  examples:
                                                    - CLIENT
                                                related_to_id:
                                                  description: The ID of object that is selected as the Custom Field Value
                                                  type: integer
                                                  examples:
                                                    - 123
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field allows multiple selection
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  relationship_object:
                                                    description: The type of object that is selected as the Custom Field Values
                                                    type: string
                                                    enum:
                                                      - CLIENT
                                                      - CONTACT
                                                    examples:
                                                      - CLIENT
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - DATETIME
                                            examples:
                                              - DATETIME
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-12-12 12:39:00'
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_past_dates:
                                                    description: Indicates if this Custom Field support past dates
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  allow_future_dates:
                                                    description: Indicates if this Custom Field support future dates
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - NUMBER
                                            examples:
                                              - NUMBER
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - integer
                                              - 'null'
                                            examples:
                                              - 12
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  min:
                                                    description: Indicates the minimum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 1
                                                  max:
                                                    description: Indicates the maximum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 3
                                    discriminator:
                                      propertyName: field_type
                        - title: Operator
                          description: Operator model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Operator
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - operator
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                operator_id:
                                  description: ID of the Operator
                                  type: integer
                                  readOnly: true
                                operator_uuid:
                                  description: Uuid of the Operator
                                  type: string
                                  format: uuid
                                  readOnly: true
                                full_name:
                                  type: string
                                email:
                                  type: string
                                  format: email
                                phone:
                                  type:
                                    - string
                                    - 'null'
                                cellphone:
                                  type:
                                    - string
                                    - 'null'
                                account:
                                  description: Type of account which determines the access permission level.
                                  type: string
                                  enum:
                                    - admin
                                    - manager
                                    - technician
                                    - operator
                                    - reporter
                                language:
                                  type: string
                                  enum:
                                    - ar
                                    - ca
                                    - da_dk
                                    - en
                                    - es
                                    - fr_fr
                                    - pl_pl
                                    - pt_br
                                    - pt_pt
                                    - ko
                                    - zh_cn
                                    - nl_nl
                                    - de_de
                                cost_per_hour:
                                  type: number
                                  minimum: 0
                                  examples:
                                    - 10
                                warehouse_id:
                                  description: ID of the warehouse associated to the Operator by default.
                                  type: integer
                                entity_id:
                                  type: integer
                                  readOnly: true
                                timezone:
                                  description: >
                                    Valid PHP timezone identifier. See the full list here:
                                    https://www.php.net/manual/en/timezones.php.
                                  type: string
                                  examples:
                                    - Europe/Lisbon
                                is_from_network:
                                  type: boolean
                                created_at:
                                  type: string
                                  format: date-time
                                phone_country_code:
                                  type: string
                                  examples:
                                    - US
                                is_first_web_login:
                                  type:
                                    - boolean
                                    - 'null'
                                  readOnly: true
                                status:
                                  type: string
                                  enum:
                                    - WORKING
                                    - AVAILABLE
                                    - OFFLINE
                                  examples:
                                    - WORKING
                            meta:
                              type: object
                              properties:
                                custom_fields:
                                  type:
                                    - object
                                    - 'null'
                                  additionalProperties:
                                    oneOf:
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - SELECT
                                            examples:
                                              - SELECT
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                option_id:
                                                  description: The ID of the selected option
                                                  type: integer
                                                  examples:
                                                    - 123
                                                option_code:
                                                  description: The code of the selected option
                                                  type:
                                                    - string
                                                    - 'null'
                                                  examples:
                                                    - OP01
                                                value:
                                                  description: The value of the selected option
                                                  type: string
                                                  examples:
                                                    - My Option 1
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field supports selecting multiple values
                                                    type: boolean
                                                    examples:
                                                      - true
                                                  managed_by_integrations:
                                                    description: >-
                                                      Indicates if the Custom Field options are only managed by
                                                      integrations
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - TEXT
                                            examples:
                                              - TEXT
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            examples:
                                              - abc
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (Empty for Custom Fields of
                                                  type TEXT)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - BOOLEAN
                                            examples:
                                              - BOOLEAN
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - boolean
                                              - 'null'
                                            examples:
                                              - true
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (There are none for the Custom
                                                  Field Boolean type)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - RELATIONSHIP
                                            examples:
                                              - RELATIONSHIP
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                related_to_type:
                                                  description: The type of object that is selected as the Custom Field Values
                                                  type: string
                                                  enum:
                                                    - CLIENT
                                                    - CONTACT
                                                  examples:
                                                    - CLIENT
                                                related_to_id:
                                                  description: The ID of object that is selected as the Custom Field Value
                                                  type: integer
                                                  examples:
                                                    - 123
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field allows multiple selection
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  relationship_object:
                                                    description: The type of object that is selected as the Custom Field Values
                                                    type: string
                                                    enum:
                                                      - CLIENT
                                                      - CONTACT
                                                    examples:
                                                      - CLIENT
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - DATETIME
                                            examples:
                                              - DATETIME
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-12-12 12:39:00'
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_past_dates:
                                                    description: Indicates if this Custom Field support past dates
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  allow_future_dates:
                                                    description: Indicates if this Custom Field support future dates
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - NUMBER
                                            examples:
                                              - NUMBER
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - integer
                                              - 'null'
                                            examples:
                                              - 12
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  min:
                                                    description: Indicates the minimum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 1
                                                  max:
                                                    description: Indicates the maximum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 3
                                    discriminator:
                                      propertyName: field_type
                        - title: Clients
                          description: Client model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Client
                              type: string
                              examples:
                                - '123'
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - client
                              examples:
                                - client
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                client_id:
                                  description: ID of the Client
                                  type: integer
                                  examples:
                                    - 123
                                client_uuid:
                                  description: UUID of the Client
                                  type: string
                                  format: uuid
                                  examples:
                                    - e632afe8-a1bf-4702-b5bd-b1163861ba51
                                name:
                                  description: Client Name
                                  type: string
                                  examples:
                                    - John Doe
                                code:
                                  description: Client Code
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - JD
                                nif:
                                  description: NIF/ VAT Number of the Client
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - '1234566789'
                                postal_code:
                                  description: Postal Code of the Client
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - 1234-567
                                city:
                                  description: City of the Client
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - Lisbon
                                observations:
                                  description: Additional information
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - abc
                                address:
                                  description: Address of the Client
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - abc
                                country:
                                  description: Country of the Client
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - PT
                                created_at:
                                  description: The datetime of the creation of the Client
                                  type: string
                                  format: date-time
                                  examples:
                                    - '2020-12-03T12:45:00'
                                  readOnly: true
                                updated_at:
                                  description: The datetime of the last update of the Client
                                  type: string
                                  format: date-time
                                  examples:
                                    - '2020-12-03T12:45:00'
                                  readOnly: true
                                has_handshake:
                                  description: Indicates if this Client is "connected" to work on Infraspeak Network.
                                  type: boolean
                                  examples:
                                    - true
                                my_company:
                                  description: Indicates whether it is the entity's default client
                                  type: boolean
                                  examples:
                                    - true
                            relationships:
                              description: The relationships of the Client (Only present when expanded in the request)
                              type: object
                              properties:
                                buildings:
                                  description: The Buildings associated to the Client
                                  type: object
                                contacts:
                                  description: The Contacts associated to the Client
                                  type: object
                                files:
                                  description: The Files associated to the Client
                                  type: object
                                profilePicture:
                                  description: The profile picture of the the Client
                                  type: object
                                operators:
                                  description: The Operators associated to the Client
                                  type: object
                                handshake:
                                  description: The Handshake associated to the Client
                                  type: object
                          required:
                            - id
                            - type
                            - attributes
                        - title: Contact
                          description: Contact model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Contact
                              type: string
                              readOnly: true
                              examples:
                                - '123'
                            type:
                              description: Model type
                              type: string
                              enum:
                                - contact
                              readOnly: true
                              examples:
                                - contact
                            attributes:
                              type: object
                              properties:
                                contact_id:
                                  description: ID of the Contact
                                  type: integer
                                  readOnly: true
                                  examples:
                                    - 123
                                entity_id:
                                  description: ID of the Entity
                                  type: integer
                                  readOnly: true
                                  examples:
                                    - 123
                                cellphone:
                                  description: The cellphone number of the Contact
                                  type: string
                                  examples:
                                    - '123456789'
                                language:
                                  description: The language of the Contact
                                  type: string
                                  examples:
                                    - pt_br
                                email:
                                  description: The email of the Contact
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - foo@bar.com
                                full_name:
                                  description: The full name of the Contact
                                  type: string
                                  examples:
                                    - Jose Pinhal
                                phone:
                                  description: The phone number of the Contact
                                  type: string
                                  examples:
                                    - '123456789'
                                is_direct_user:
                                  description: Indicates whether the contact is a Direct user
                                  type: boolean
                                  examples:
                                    - false
                                has_access:
                                  description: Indicates whether the contact has access to Direct
                                  oneOf:
                                    - type: boolean
                                    - type: integer
                                      enum:
                                        - 0
                                        - 1
                                  examples:
                                    - false
                            relationships:
                              description: The relationships of the Contact
                              type: object
                              properties:
                                suppliers:
                                  description: The Suppliers associated to the Contact
                                  type: object
                                clients:
                                  description: The Clients associated to the Contact
                                  type: object
                                extensionsPermissions:
                                  description: The Extensions Permissions associated to the Contact
                                  type: object
                                locals:
                                  description: The Locations associated to the Contact
                                  type: object
                                profilePicture:
                                  description: The profile picture of the Contact
                                  type: object
                                user:
                                  description: The user associated to the Contact
                                  type: object
                            meta:
                              type: object
                              properties:
                                custom_fields:
                                  type:
                                    - object
                                    - 'null'
                                  additionalProperties:
                                    oneOf:
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - SELECT
                                            examples:
                                              - SELECT
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                option_id:
                                                  description: The ID of the selected option
                                                  type: integer
                                                  examples:
                                                    - 123
                                                option_code:
                                                  description: The code of the selected option
                                                  type:
                                                    - string
                                                    - 'null'
                                                  examples:
                                                    - OP01
                                                value:
                                                  description: The value of the selected option
                                                  type: string
                                                  examples:
                                                    - My Option 1
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field supports selecting multiple values
                                                    type: boolean
                                                    examples:
                                                      - true
                                                  managed_by_integrations:
                                                    description: >-
                                                      Indicates if the Custom Field options are only managed by
                                                      integrations
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - TEXT
                                            examples:
                                              - TEXT
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            examples:
                                              - abc
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (Empty for Custom Fields of
                                                  type TEXT)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - BOOLEAN
                                            examples:
                                              - BOOLEAN
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - boolean
                                              - 'null'
                                            examples:
                                              - true
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (There are none for the Custom
                                                  Field Boolean type)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - RELATIONSHIP
                                            examples:
                                              - RELATIONSHIP
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                related_to_type:
                                                  description: The type of object that is selected as the Custom Field Values
                                                  type: string
                                                  enum:
                                                    - CLIENT
                                                    - CONTACT
                                                  examples:
                                                    - CLIENT
                                                related_to_id:
                                                  description: The ID of object that is selected as the Custom Field Value
                                                  type: integer
                                                  examples:
                                                    - 123
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field allows multiple selection
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  relationship_object:
                                                    description: The type of object that is selected as the Custom Field Values
                                                    type: string
                                                    enum:
                                                      - CLIENT
                                                      - CONTACT
                                                    examples:
                                                      - CLIENT
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - DATETIME
                                            examples:
                                              - DATETIME
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-12-12 12:39:00'
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_past_dates:
                                                    description: Indicates if this Custom Field support past dates
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  allow_future_dates:
                                                    description: Indicates if this Custom Field support future dates
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - NUMBER
                                            examples:
                                              - NUMBER
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - integer
                                              - 'null'
                                            examples:
                                              - 12
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  min:
                                                    description: Indicates the minimum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 1
                                                  max:
                                                    description: Indicates the maximum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 3
                                    discriminator:
                                      propertyName: field_type
                          required:
                            - id
                            - type
                            - attributes
                        - title: Failure
                          description: Failure model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Failure
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - failure
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                failure_id:
                                  description: ID of the Failure
                                  type: integer
                                  readOnly: true
                                  examples:
                                    - 1
                                uuid:
                                  description: Universally Unique Identifier for the Failure
                                  type: string
                                  format: uuid
                                  readOnly: true
                                problem_id:
                                  description: ID of the associated problem
                                  type: integer
                                status:
                                  type: string
                                  enum:
                                    - WAITING_APPROVAL
                                    - WAITING_RESOLUTION
                                    - IN_RESOLUTION
                                    - PAUSED
                                    - COMPLETED
                                    - ARCHIVED
                                  readOnly: true
                                start_date:
                                  type: string
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T08:48:00.000Z'
                                completed_date:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T17:12:00.000Z'
                                approved_date:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T09:30:00.000Z'
                                paused_date:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T13:05:00.000Z'
                                description:
                                  type: string
                                  examples:
                                    - Needs replacement
                                last_status_description:
                                  type: string
                                  examples:
                                    - Completed
                                observations:
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - Needs a new part
                                code:
                                  type: string
                                  examples:
                                    - WO2022
                                fts_vector:
                                  description: Denormalized data of a Failure
                                  type: string
                                priority:
                                  description: Failure priority number being 1 the lowest priority and 4 the highest priority.
                                  type: integer
                                  enum:
                                    - 1
                                    - 2
                                    - 3
                                    - 4
                                client_id:
                                  description: ID of the associated client defined according to the respective `local_id`.
                                  type: integer
                                  readOnly: true
                                entity_id:
                                  description: ID of the Entity of the Failure
                                  type: integer
                                  readOnly: true
                                metering_registry_id:
                                  description: ID of a possible associated metering registry
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                local_id:
                                  description: ID of the location associated to the Failure
                                  type: integer
                                paused_reason_id:
                                  description: ID of the paused reason associated to the Failure
                                  type: integer
                                external_id:
                                  description: External ID to be associated to the Failure
                                  type:
                                    - string
                                    - 'null'
                                report_name:
                                  description: Name of who reported the Failure
                                  type: string
                                solved:
                                  description: Indicates whether the Failure was closed successfully or not
                                  type: boolean
                                  readOnly: true
                                  default: false
                                confirmed:
                                  description: Indicates whether the Failure is confirmed or not
                                  type: boolean
                                  readOnly: true
                                  default: false
                                started:
                                  description: Indicates whether the Failure is started or not
                                  type: boolean
                                  readOnly: true
                                  default: false
                                paused:
                                  description: Indicates whether the Failure is paused or not
                                  type: boolean
                                  readOnly: true
                                  default: false
                                completed:
                                  description: Indicates whether the Failure is completed or not
                                  type: boolean
                                  readOnly: true
                                  default: false
                                archived:
                                  description: Indicates whether the Failure is archived or not
                                  type: boolean
                                  readOnly: true
                                  default: false
                                approved:
                                  description: Indicates whether the Failure is approved or not
                                  type: boolean
                                  readOnly: true
                                  default: false
                                next_schedule:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-29T10:30:00.000Z'
                                message_count:
                                  type: integer
                                  minimum: 0
                                  default: 0
                                  examples:
                                    - 3
                                time_statistics:
                                  type: object
                                  properties:
                                    approved_date:
                                      type:
                                        - string
                                        - 'null'
                                      format: date-time
                                      readOnly: true
                                      examples:
                                        - '2020-08-28T09:30:00.000Z'
                                    last_completed_date:
                                      type:
                                        - string
                                        - 'null'
                                      format: date-time
                                      readOnly: true
                                      examples:
                                        - '2020-08-28T17:12:00.000Z'
                                    last_paused_date:
                                      type:
                                        - string
                                        - 'null'
                                      format: date-time
                                      readOnly: true
                                      examples:
                                        - '2020-08-28T13:05:00.000Z'
                                    started_date:
                                      type:
                                        - string
                                        - 'null'
                                      format: date-time
                                      readOnly: true
                                      examples:
                                        - '2020-08-28T09:45:00.000Z'
                                    time_to_approve:
                                      description: Duration it took to approve the Failure since reported in `ISO8601` format.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - P0Y0M0DT0H42M0S
                                    time_to_complete:
                                      description: Duration it took to complete the Failure since reported in `ISO8601` format.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - P0Y0M0DT8H24M0S
                                    time_to_complete_after_started:
                                      description: >-
                                        Duration it took to complete the Failure since the resolution started in
                                        `ISO8601` format.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - P0Y0M0DT7H27M0S
                                    time_to_start:
                                      description: >-
                                        Duration it took to start the Failure's resolution since reported in `ISO8601`
                                        format.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - P0Y0M0DT0H57M0S
                                    time_to_start_after_approved:
                                      description: >-
                                        Duration it took to start the Failure's resolution since approved in `ISO8601`
                                        format.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - P0Y0M0DT0H15M0S
                                    real_duration:
                                      description: Real duration of the Failure's resolution time in `ISO8601` format.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - P0Y0M0DT7H27M0S
                                supplier_id:
                                  description: ID of the supplier associated to the Failure
                                  type: integer
                                signature_status:
                                  description: Indicates whether the Failure is signed or not
                                  type: string
                                  enum:
                                    - SIGNED
                                    - NOT_SIGNED
                                  default: NOT_SIGNED
                                last_status_change_date:
                                  type: string
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T09:30:00.000Z'
                                approved_by_id:
                                  description: ID of the operator who approved the Failure.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                completed_by_id:
                                  description: ID of the operator who completed the Failure.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                started_by_id:
                                  description: ID of the operator who started the Failure's resolution.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                paused_by_id:
                                  description: ID of the operator who paused the Failure's resolution.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                approved_by:
                                  description: Name of the operator who approved the Failure.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                completed_by:
                                  description: Name of the operator who completed the Failure.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                started_by:
                                  description: Name of the operator who started the Failure's resolution.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                paused_by:
                                  description: Name of the operator who paused the Failure's resolution.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                reported_by:
                                  description: Name of the operator who reported the Failure.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                manpower_duration:
                                  description: Duration of the Failure's manpower time in `ISO8601` format.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                  examples:
                                    - P0Y0M0DT7H27M0S
                                cost_center_id:
                                  description: ID of the cost center associated to the Failure
                                  type:
                                    - integer
                                    - 'null'
                                network_failure_id:
                                  description: ID of the Network Failure
                                  type: integer
                                  readOnly: true
                                  examples:
                                    - 1
                                created_at:
                                  type: string
                                  format: date-time
                                  readOnly: true
                                updated_at:
                                  type: string
                                  format: date-time
                                  readOnly: true
                                date_deleted:
                                  type: string
                                  format: date-time
                                  readOnly: true
                            relationships:
                              type: object
                              properties:
                                approvedBy:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                completedBy:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                createdBy:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                files:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - file
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                location:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - location
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                operator:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                          required:
                            - id
                            - type
                            - attributes
                        - title: File
                          description: File model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the File
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - file
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                file_id:
                                  description: File Id
                                  type: integer
                                  readOnly: true
                                file_uuid:
                                  description: File UUID
                                  type: string
                                  readOnly: true
                                related_to:
                                  description: Object which the File is related to
                                  type: string
                                  enum:
                                    - BUILDING
                                    - CATEGORY
                                    - CLIENT
                                    - ELEMENT
                                    - ELEMENT_REGISTRY
                                    - FAILURE
                                    - METERING_REGISTRY
                                    - OPERATOR
                                    - ORDER
                                    - QUOTE
                                    - QUOTE_REQUEST
                                    - RECEIVED_QUOTE
                                    - RECEIVED_QUOTE_REQUEST
                                    - REQUEST
                                    - SELL_ORDER
                                    - SUPPLIER
                                    - SCHEDULE_WORK
                                    - WORK
                                    - SCHEDULED_WORK
                                    - PURCHASE
                                    - PURCHASE_MATERIAL_LINE
                                    - PURCHASE_SERVICE_LINE
                                    - SALE
                                related_to_id:
                                  description: Relations Id
                                  type: integer
                                related_type:
                                  description: Object which the File is related to
                                  type: string
                                  enum:
                                    - BUILDING
                                    - CATEGORY
                                    - CLIENT
                                    - ELEMENT
                                    - ELEMENT_REGISTRY
                                    - FAILURE
                                    - METERING_REGISTRY
                                    - OPERATOR
                                    - ORDER
                                    - QUOTE
                                    - QUOTE_REQUEST
                                    - RECEIVED_QUOTE
                                    - RECEIVED_QUOTE_REQUEST
                                    - REQUEST
                                    - SELL_ORDER
                                    - SUPPLIER
                                    - SCHEDULE_WORK
                                    - WORK
                                  readOnly: true
                                file_label_id:
                                  description: File Label Id
                                  type:
                                    - integer
                                    - 'null'
                                name:
                                  description: File name
                                  type: string
                                  examples:
                                    - my_example_file
                                thumb:
                                  description: URL to the thumbnail, in case the File is an image.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                file_url:
                                  description: URL to the File
                                  type: string
                                  format: uri
                                  readOnly: true
                                description:
                                  type:
                                    - string
                                    - 'null'
                                expire_date:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T17:12:00.000Z'
                                has_reminder:
                                  type: boolean
                                  readOnly: true
                                file_type:
                                  description: Internal type of the file
                                  type: string
                                  enum:
                                    - cad
                                    - compressed
                                    - file
                                    - image
                                    - office
                                    - other
                                    - pdf
                                    - signature
                                    - video
                                  readOnly: true
                                permission_to_technician:
                                  type: boolean
                                  default: true
                                permission_to_manager:
                                  type: boolean
                                  default: true
                                permission_to_direct:
                                  type: boolean
                                  default: false
                                extension:
                                  type: string
                                  enum:
                                    - 3gp
                                    - 3gpp
                                    - bin
                                    - bmp
                                    - cad
                                    - csv
                                    - doc
                                    - docx
                                    - gif
                                    - jpeg
                                    - jpg
                                    - kmz
                                    - mov
                                    - mp4
                                    - odf
                                    - odp
                                    - pdf
                                    - png
                                    - ppt
                                    - pptx
                                    - qt
                                    - rar
                                    - txt
                                    - xls
                                    - xlsx
                                    - zip
                                  readOnly: true
                                network_status:
                                  description: Show the network status of the file.
                                  type: string
                                  enum:
                                    - SHARED
                                    - RECEIVED
                                    - NOT_SHARED
                                shared_with_supplier:
                                  description: Show if the file is currently in a shared status with the supplier.
                                  type: boolean
                                shared_with_client:
                                  description: Show if the file is currently in a shared status with the client.
                                  type: boolean
                                file_size:
                                  type: integer
                                  readOnly: true
                                created_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                  readOnly: true
                          required:
                            - id
                            - type
                            - attributes
                        - title: Quote
                          description: Quote model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Quote.
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - quote
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                quote_id:
                                  description: ID of the Quote.
                                  type: integer
                                  readOnly: true
                                quote_uuid:
                                  description: UUID of the Quote.
                                  type:
                                    - string
                                    - 'null'
                                  format: uuid
                                  readOnly: true
                                code:
                                  description: Code of the Quote. Visible on Infraspeak platform.
                                  type: integer
                                  readOnly: true
                                client_id:
                                  description: ID of the Client associated to the quote.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                state:
                                  description: State of the Quote.
                                  type: string
                                  enum:
                                    - DRAFT
                                    - READY
                                    - ACCEPTED
                                    - DECLINED
                                    - CANCELLED
                                    - CONVERTED_TO_SALE
                                  default: DRAFT
                                  examples:
                                    - DRAFT
                                entity_id:
                                  type: integer
                                  readOnly: true
                                created_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: Creation date of the Quote
                                      readOnly: true
                                created_by:
                                  description: ID of the operator that created the Quote.
                                  type: integer
                                  readOnly: true
                                started_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: Date when Quote has started.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                started_by:
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                ready_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: Date Quote is marked as Awaiting.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                ready_by_id:
                                  description: ID of the user who marked the quote as Awaiting.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                ready_by_type:
                                  description: Type of user who marked the Quote as Awaiting.
                                  type:
                                    - string
                                    - 'null'
                                  enum:
                                    - OPERATOR
                                    - CONTACT
                                    - null
                                  default: OPERATOR
                                accepted_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: Date Quote is accepted.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                accepted_by_id:
                                  description: ID of the user who accepted the Quote.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                accepted_by_type:
                                  description: Type of user who accepted the Quote.
                                  type:
                                    - string
                                    - 'null'
                                  enum:
                                    - OPERATOR
                                    - CONTACT
                                    - null
                                  default: OPERATOR
                                declined_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: Date Quote was declined.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                declined_by_id:
                                  description: ID of the user who declined the quote.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                declined_by_type:
                                  description: Type of user who declined the Quote.
                                  type:
                                    - string
                                    - 'null'
                                  enum:
                                    - OPERATOR
                                    - CONTACT
                                    - null
                                  default: OPERATOR
                                cancelled_by:
                                  description: ID of the user who cancelled the quote.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                cancelled_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: Date Quote was cancelled.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                last_sent_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: Date Quote was last sent.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                last_sent_by:
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                last_share_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: Date Quote was last shared.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                last_share_by:
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                converted_by:
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                converted_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: Date Quote was converted.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                description:
                                  description: Quote observations.
                                  type:
                                    - string
                                    - 'null'
                                internal_quote_id:
                                  description: Internal ID of the Quote.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                  examples:
                                    - FS-123
                                external_quote_id:
                                  description: External ID of the Quote.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                  examples:
                                    - FS-123
                                related_to_type:
                                  description: Type of object related to the quote.
                                  type:
                                    - string
                                    - 'null'
                                  enum:
                                    - FAILURE
                                    - SCHEDULED_WORK
                                    - null
                                  examples:
                                    - FAILURE
                                related_to_id:
                                  description: ID of the object (failure or scheduled work) related to the quote.
                                  type:
                                    - integer
                                    - 'null'
                                base_total:
                                  description: Total Base value of the Quote, without VAT and discount.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                discount_total:
                                  description: Total value of the discount applied to the Quote items.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                vat_total:
                                  description: Total value of the VAT applied to the Quote items.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                total:
                                  description: Total value of the Quote, considering the discount and VAT applied.
                                  type: integer
                                  readOnly: true
                                sell_order_id:
                                  description: ID of the Sale associated to the Quote, after converted.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                updated_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: Date Quote was updated.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                deleted_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: Date Quote was deleted.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                quote_request_id:
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                received_quote_request_id:
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                is_from_network:
                                  type: boolean
                                  readOnly: true
                                client_answer:
                                  type: object
                                  properties:
                                    clientUserName:
                                      type: string
                                    clientName:
                                      type: string
                                    answer:
                                      type: string
                            meta:
                              type: object
                              properties:
                                custom_fields:
                                  type:
                                    - object
                                    - 'null'
                                  additionalProperties:
                                    oneOf:
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - SELECT
                                            examples:
                                              - SELECT
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                option_id:
                                                  description: The ID of the selected option
                                                  type: integer
                                                  examples:
                                                    - 123
                                                option_code:
                                                  description: The code of the selected option
                                                  type:
                                                    - string
                                                    - 'null'
                                                  examples:
                                                    - OP01
                                                value:
                                                  description: The value of the selected option
                                                  type: string
                                                  examples:
                                                    - My Option 1
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field supports selecting multiple values
                                                    type: boolean
                                                    examples:
                                                      - true
                                                  managed_by_integrations:
                                                    description: >-
                                                      Indicates if the Custom Field options are only managed by
                                                      integrations
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - TEXT
                                            examples:
                                              - TEXT
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            examples:
                                              - abc
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (Empty for Custom Fields of
                                                  type TEXT)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - BOOLEAN
                                            examples:
                                              - BOOLEAN
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - boolean
                                              - 'null'
                                            examples:
                                              - true
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (There are none for the Custom
                                                  Field Boolean type)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - RELATIONSHIP
                                            examples:
                                              - RELATIONSHIP
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                related_to_type:
                                                  description: The type of object that is selected as the Custom Field Values
                                                  type: string
                                                  enum:
                                                    - CLIENT
                                                    - CONTACT
                                                  examples:
                                                    - CLIENT
                                                related_to_id:
                                                  description: The ID of object that is selected as the Custom Field Value
                                                  type: integer
                                                  examples:
                                                    - 123
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field allows multiple selection
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  relationship_object:
                                                    description: The type of object that is selected as the Custom Field Values
                                                    type: string
                                                    enum:
                                                      - CLIENT
                                                      - CONTACT
                                                    examples:
                                                      - CLIENT
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - DATETIME
                                            examples:
                                              - DATETIME
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-12-12 12:39:00'
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_past_dates:
                                                    description: Indicates if this Custom Field support past dates
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  allow_future_dates:
                                                    description: Indicates if this Custom Field support future dates
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - NUMBER
                                            examples:
                                              - NUMBER
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - integer
                                              - 'null'
                                            examples:
                                              - 12
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  min:
                                                    description: Indicates the minimum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 1
                                                  max:
                                                    description: Indicates the maximum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 3
                                    discriminator:
                                      propertyName: field_type
                        - title: Scheduled Work
                          description: Scheduled Order model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Scheduled Order
                              type: string
                              readOnly: true
                              examples:
                                - '123'
                            type:
                              description: Model type
                              type: string
                              enum:
                                - scheduled_work
                              readOnly: true
                              examples:
                                - scheduled_work
                            attributes:
                              type: object
                              properties:
                                entity_id:
                                  description: The ID of the Entity where the Scheduled Work belongs.
                                  type: integer
                                  examples:
                                    - 123
                                complete_date:
                                  description: The datetime when the Scheduled Work was completed
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  examples:
                                    - '2014-09-01 02:22:00'
                                cost_center_name:
                                  description: The name of the Cost Center associated with the Scheduled Work.
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - abc
                                completed_by_id:
                                  description: The ID of the Operator that completed the Scheduled Work.
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 123
                                completed_percentage:
                                  description: The percentage of the Scheduled Work that is completed.
                                  type: integer
                                  examples:
                                    - 45
                                completed_date:
                                  description: The datetime when the Scheduled Work was completed
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  examples:
                                    - '2014-09-01 02:22:00'
                                confirmed:
                                  description: Indicates if the Scheduled Work is confirmed.
                                  type: boolean
                                  examples:
                                    - true
                                failure_id:
                                  description: >-
                                    The ID of the Failure / Work Order associated with the Scheduled Work (Only if the
                                    Scheduled work originated from a Failure / Work Order)
                                  type:
                                    - integer
                                    - 'null'
                                last_status_change_date:
                                  description: The datetime when the Scheduled Work status changed for the last time
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  examples:
                                    - '2014-09-01 02:22:00'
                                last_status_change_operator:
                                  description: The name of the Operator that changed the Scheduled Work status for the last time
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - John
                                manpower_duration:
                                  description: The total manpower duration of the Scheduled work in ISO-8601 duration format.
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - P0Y0M0DT0H1M19S
                                manpower_cost:
                                  description: The total manpower cost of the Scheduled work in the currency of the logged in user.
                                  type:
                                    - number
                                    - 'null'
                                  examples:
                                    - 12.5
                                observation:
                                  description: Observations added to the Scheduled Work.
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - abc
                                real_start_date:
                                  description: >-
                                    The datetime when the Scheduled Work was actually started (not to confuse with the
                                    datetime when the Scheduled work planned to start)
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  examples:
                                    - '2014-09-01 02:22:00'
                                running:
                                  description: Indicates if the Scheduled Work is currently in a running status
                                  type: boolean
                                  examples:
                                    - true
                                schedule_work_id:
                                  description: The ID of the Scheduled Work
                                  type: integer
                                  examples:
                                    - 123
                                signature_status:
                                  description: Indicates if the Scheduled Work is signed by a responsible.
                                  type: string
                                  enum:
                                    - NOT_SIGNED
                                    - SIGNED
                                  examples:
                                    - NOT_SIGNED
                                start_date:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: The datetime when the Scheduled Work is/was planned to start
                                started_by_id:
                                  description: The ID of the Operator that started the Scheduled Work.
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 123
                                state:
                                  description: The current state of the Scheduled Work.
                                  type: string
                                  enum:
                                    - SCHEDULED
                                    - RUNNING
                                    - PAUSED
                                    - COMPLETED
                                    - CANCELED
                                    - ARCHIVED
                                    - COMPLETED_CANCELED
                                  examples:
                                    - COMPLETED
                                time_running:
                                  description: The current running duration of the Scheduled work in ISO-8601 duration format.
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - P0Y0M0DT0H1M19S
                                visit:
                                  description: >-
                                    Indicates the position/step of the Scheduled work in the parent Work / Planned Job
                                    that is originates from (e.g. can be the first Scheduled Work of the Work / Planned
                                    Job, the second, and so on)
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 1
                                work_id:
                                  description: The ID of the parent Work / Planned Job
                                  type: integer
                                  examples:
                                    - 123
                                next_sla_date:
                                  description: >
                                    The datetime of the closest SLA that is still ongoing in the Scheduled Work

                                    (This field includes only SLAs that have not finished yet and are still ongoing, and
                                    will be null if there's none)
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  examples:
                                    - '2014-09-01 02:22:00'
                                next_sla_percentage:
                                  description: >
                                    The percentage of the Scheduled Work tasks that are completed in the closest SLA
                                    that is still ongoing

                                    (This field includes only SLAs that have not finished yet and are still ongoing, and
                                    will be null if there's none)
                                  type:
                                    - number
                                    - 'null'
                                  examples:
                                    - 75.5
                                next_scheduled_work_sla_id:
                                  description: >
                                    The ID of the next SLA

                                    (This field includes the next SLA, despite his current status being already finished
                                    or paused)
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 123
                                next_scheduled_work_sla_date:
                                  description: >
                                    The datetime of the next SLA

                                    (This field includes the next SLA, despite his current status being already finished
                                    or paused)
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  examples:
                                    - '2014-09-01 02:22:00'
                                next_scheduled_work_sla_status_order:
                                  description: >
                                    The status order of the next SLA

                                    (0 if status is 'RUNNING', 1 if status is 'PAUSED', 2 if status is 'FINISHED',
                                    otherwise 3)

                                    (This field includes the next SLA, despite his current status being already finished
                                    or paused)
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 0
                                rescheduled_by_user:
                                  description: Indicates if the Scheduled Work was manually rescheduled by an User
                                  type: boolean
                                  examples:
                                    - false
                                network_id:
                                  description: ID used to reference a shared Planned Job Order
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 123
                                updated_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: The datetime of the last update in the Scheduled Work
                                display_start_date:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: The start datetime to display in the Scheduled Work
                                      type:
                                        - string
                                        - 'null'
                                display_complete_date:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: The complete datetime to display in the Scheduled Work
                                      type:
                                        - string
                                        - 'null'
                                estimated_duration_absolute_deviation:
                                  description: >-
                                    The absolute deviation between the actual manpower duration and the estimated task
                                    time in the Scheduled Work, representing the total difference regardless of whether
                                    the estimate was over or under
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 150
                                estimated_duration_relative_deviation:
                                  description: >-
                                    The relative deviation between the actual manpower duration and the estimated task
                                    time in the Scheduled Work. A negative value indicates the estimate was too low,
                                    while a positive value indicates it was too high
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - -150
                                pause_reason_id:
                                  description: The ID of the Pause Reason associated with the Scheduled Work
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 123
                                last_status_description:
                                  description: A description provided when the last status change occurred on the Scheduled Work
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - Waiting for spare parts delivery
                            relationships:
                              description: The relationships of the Scheduled Work (Only present when expanded in the request)
                              type: object
                              properties:
                                auditStats:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - audit_stats
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                buyOrders:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - buy_order
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                client:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - client
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                completedBy:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                elementRegistries:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - element_registry
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                entity:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - entity
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                events:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - event
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                eventsPlanned:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - event
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                files:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - file
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                gatekeeperAnswerRegistries:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - gatekeeper_answer_registry
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                networkStatus:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            description: >-
                                              If RECEIVER the Scheduled Work was received on Network, if SENDER the
                                              Scheduled Work was sent to the Network.
                                            type: string
                                            enum:
                                              - SENDER
                                              - RECEIVER
                                            readOnly: true
                                          action:
                                            description: >-
                                              If UNSHARED, the Scheduled Work was unshared from Network, if null, no
                                              action was taken.
                                            type: string
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                          in_sync:
                                            description: If the Scheduled Work is in sync of execution with the Network.
                                            type: boolean
                                            readOnly: true
                                          network_entity_uuid:
                                            description: >-
                                              The UUID of the Network Entity related to the Scheduled Work network
                                              status.
                                            type: string
                                            readOnly: true
                                          network_relation_id:
                                            description: >-
                                              The ID of the Network Relation related to the Scheduled Work network
                                              status. It can be from a Client or a Supplier.
                                            type: integer
                                            readOnly: true
                                          network_relation_type:
                                            description: >-
                                              The type of Network Relation related to the Scheduled Work network status.
                                              It can be from a Client or a Supplier, used to identify the relation ID
                                              and the relation the Network Entity has to the Scheduled Work.
                                            type: string
                                            enum:
                                              - CLIENT
                                              - SUPPLIER
                                            readOnly: true
                                          shared:
                                            description: If the Scheduled Work is actively shared on Network.
                                            type: boolean
                                            readOnly: true
                                otherCosts:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - other-cost
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                participants:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - operator
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                pausedBy:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                reminderRules:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - reminder_rules
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                reminders:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - reminder
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                requests:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - request
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                scheduledWorkSlas:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - schedule_work_sla
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                startedBy:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                stock:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - stock
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                stockTasks:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - stock
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                survey:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - survey
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                surveyFeedbacks:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - survey_feedback
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                work:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - work
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                realStartDateEditedBy:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                completeDateEditedBy:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                failureScheduleMapping:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - failure_schedule_mapping
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                pause_reason:
                                  description: The Pause Reason associated with the Scheduled Work
                                  type: object
                                  properties:
                                    data:
                                      type:
                                        - object
                                        - 'null'
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - pause_reason
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                assignees:
                                  description: The Operators and Teams assigned to the Scheduled Work
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - scheduled_work_assignee
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                          required:
                            - id
                            - type
                            - attributes
                    uniqueItems: true
                  meta:
                    title: Meta
                    description: Meta model structure details
                    type: object
                    properties:
                      cost_centers:
                        type: object
                        properties:
                          names:
                            type: array
                            items:
                              type: string
                            examples:
                              - - Cost center
                                - Cost center 2
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
    delete:
      operationId: deleteSellOrder
      tags:
        - Sell Orders
      summary: Delete a Sell Order (Sale)
      description: This endpoint allows you to delete a specific Sell Order (Sale).
      parameters:
        - name: sellOrderId
          in: path
          description: The Sell Order (Sale) ID
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items: {}
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
    patch:
      operationId: updateSellOrder
      tags:
        - Sell Orders
      summary: Update a Sell Order (Sale)
      description: This endpoint allows you to update a Sell Order (Sale).
      parameters:
        - name: sellOrderId
          in: path
          description: The Sell Order (Sale) ID
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              description: Sell Order (Sale) Update Payload
              type: object
              properties:
                client_id:
                  allOf:
                    - description: |
                        ID of the client associated with the Sell Order (Sale).

                        **This field is required if `related_to_type` and `related_to_id` are not filled.**
                      type: integer
                      examples:
                        - 123
                    - description: ID of the client associated with the Sell Order (Sale).
                description:
                  description: >
                    Observations or notes for the Sell Order (Sale).


                    This field is a free text input that holds any information regarding the Sell Order (Sale), filled
                    by the user.
                  type:
                    - string
                    - 'null'
                  examples:
                    - Some information regarding the sell Order (Sale)
                internal_sale_id:
                  description: |
                    Internal ID of the Sell Order (Sale).
                  type:
                    - string
                    - 'null'
                  examples:
                    - '123'
                external_sale_id:
                  description: >
                    External ID of the associated Sell Order (Sale).


                    Usually used to identify the Sell Order (Sale) with an unique identifier from a third-party
                    application.
                  type:
                    - string
                    - 'null'
                  examples:
                    - 1e29e166-c6b8-4686-8856-2090d8dc12e1
                related_to_type:
                  description: |
                    Type of the Infraspeak Object related to the Sell Order (Sale).

                    **This is required when the field `related_to_id` is filled.**

                    Allowed values for this field are:
                    - `FAILURE` (Work Order)
                    - `SCHEDULED_WORK` (Planned Job Order)
                  type:
                    - string
                    - 'null'
                  enum:
                    - FAILURE
                    - SCHEDULED_WORK
                  examples:
                    - FAILURE
                related_to_id:
                  description: |
                    ID for the Infraspeak Object related to the Sell Order (Sale).

                    **This is required when the field `related_to_type` is filled.**

                    Possible related objects to a Sell Order (Sale) are:
                    - `FAILURE` (Work Order)
                    - `SCHEDULED_WORK` (Planned Job Order)
                  type:
                    - integer
                    - 'null'
                  examples:
                    - 123
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: Sell Order (Sale)
                    description: |
                      Sell Order (Sale) Resource structure details.
                    type: object
                    properties:
                      id:
                        description: ID for the Sell Order (Sale) in Infraspeak.
                        type: string
                        examples:
                          - '123'
                        readOnly: true
                      type:
                        description: Resource type
                        type: string
                        enum:
                          - sell_order
                        examples:
                          - sell_order
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          client_id:
                            description: |
                              ID of the client associated with the Sell Order (Sale).

                              **This field is required if `related_to_type` and `related_to_id` are not filled.**
                            type: integer
                            examples:
                              - 123
                          code:
                            description: Code used to identify the Sell Order (Sale) in Infraspeak.
                            type: integer
                            examples:
                              - 123
                            readOnly: true
                          sell_order_uuid:
                            description: Universally Unique Identifier (UUID) for the Sell Order (Sale).
                            type: string
                            format: uuid
                            examples:
                              - 3ac7648a-d628-47d8-b9a5-bf6c5edfe176
                            readOnly: true
                          state:
                            description: |
                              Current State for the Sell Order (Sale).

                              Possible states for a Sell Order (Sale) in Infraspeak are:
                              - `DRAFT`
                              - `CANCELLED`
                              - `RUNNING`
                              - `COMPLETED`
                              - `COMPLETED_CONFIRMED`
                            type: string
                            enum:
                              - DRAFT
                              - CANCELLED
                              - RUNNING
                              - COMPLETED
                              - COMPLETED_CONFIRMED
                            examples:
                              - DRAFT
                          entity_id:
                            description: |
                              ID for the Entity this Sell Order (Sale) belongs to in Infraspeak.
                            type: integer
                            examples:
                              - 123
                            readOnly: true
                          created_at:
                            description: Creation date of the Sell Order (Sale).
                            type: string
                            format: date-time
                            examples:
                              - '2020-08-28 08:48:00'
                            readOnly: true
                          created_by:
                            description: ID for the Operator who created the Sell Order (Sale).
                            type: integer
                            examples:
                              - 123
                          started_at:
                            description: Date indicating when the Sell Order (Sale) was Started (state 'RUNNING').
                            type:
                              - string
                              - 'null'
                            format: date-time
                            examples:
                              - '2020-08-28T08:48:00.000Z'
                            readOnly: true
                          started_by:
                            description: ID for the Operator who started the Sell Order (Sale).
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 123
                          completed_at:
                            description: Date indicating when the Sell Order (Sale) was Completed (state 'COMPLETED').
                            type:
                              - string
                              - 'null'
                            format: date-time
                            examples:
                              - '2020-08-28T08:48:00.000Z'
                            readOnly: true
                          completed_by:
                            description: ID for the Operator who completed the Sell Order (Sale).
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 123
                          cancelled_at:
                            description: Date indicating when the Sell Order (Sale) was Cancelled (state 'CANCELED').
                            type:
                              - string
                              - 'null'
                            format: date-time
                            examples:
                              - '2020-08-28T08:48:00.000Z'
                            readOnly: true
                          cancelled_by:
                            description: ID for the Operator that cancelled the Sell Order (Sale).
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 123
                          description:
                            description: >
                              Observations or notes for the Sell Order (Sale).


                              This field is a free text input that holds any information regarding the Sell Order
                              (Sale), filled by the user.
                            type:
                              - string
                              - 'null'
                            examples:
                              - Some information regarding the sell Order (Sale)
                          internal_sale_id:
                            description: |
                              Internal ID of the Sell Order (Sale).
                            type:
                              - string
                              - 'null'
                            examples:
                              - '123'
                          external_sale_id:
                            description: >
                              External ID of the associated Sell Order (Sale).


                              Usually used to identify the Sell Order (Sale) with an unique identifier from a
                              third-party application.
                            type:
                              - string
                              - 'null'
                            examples:
                              - 1e29e166-c6b8-4686-8856-2090d8dc12e1
                          related_to_type:
                            description: |
                              Type of the Infraspeak Object related to the Sell Order (Sale).

                              **This is required when the field `related_to_id` is filled.**

                              Allowed values for this field are:
                              - `FAILURE` (Work Order)
                              - `SCHEDULED_WORK` (Planned Job Order)
                            type:
                              - string
                              - 'null'
                            enum:
                              - FAILURE
                              - SCHEDULED_WORK
                            examples:
                              - FAILURE
                          related_to_id:
                            description: |
                              ID for the Infraspeak Object related to the Sell Order (Sale).

                              **This is required when the field `related_to_type` is filled.**

                              Possible related objects to a Sell Order (Sale) are:
                              - `FAILURE` (Work Order)
                              - `SCHEDULED_WORK` (Planned Job Order)
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 123
                          quote_id:
                            description: ID of the Quote that originated the Sell Order (Sale).
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 123
                          base_total:
                            description: |
                              Total Base Price for the Sell Order (Sale).

                              **This does not include Taxes or Discounts.**
                            type: number
                            examples:
                              - 11.22
                          discount_total:
                            description: |
                              Discount total for the Sell Order (Sale).
                            type: number
                            examples:
                              - 0.22
                          vat_total:
                            description: |
                              Taxes total for the Sell Order (Sale).
                            type: number
                            examples:
                              - 1
                          total:
                            description: |
                              Total Price for the Sell Order (Sale) including Taxes and Discounts.
                            type: number
                            examples:
                              - 12
                          updated_at:
                            description: Date for the last change in the Sell Order (Sale).
                            type: string
                            format: date-time
                            examples:
                              - '2020-08-28T13:05:00.000Z'
                            readOnly: true
                          confirmed_by:
                            description: ID for the Operator that confirmed the Sell Order (Sale).
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 123
                          confirmed_at:
                            description: Date indicating when the Operator confirmed the Sell Order (Sale).
                            type: string
                            format: date-time
                            examples:
                              - '2024-08-28T16:05:00.000Z'
                      meta:
                        type: object
                        properties:
                          custom_fields:
                            type:
                              - object
                              - 'null'
                            additionalProperties:
                              oneOf:
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - SELECT
                                      examples:
                                        - SELECT
                                    value:
                                      description: The current values of the Custom Field in this resource
                                      type:
                                        - array
                                        - 'null'
                                      items:
                                        type: object
                                        properties:
                                          option_id:
                                            description: The ID of the selected option
                                            type: integer
                                            examples:
                                              - 123
                                          option_code:
                                            description: The code of the selected option
                                            type:
                                              - string
                                              - 'null'
                                            examples:
                                              - OP01
                                          value:
                                            description: The value of the selected option
                                            type: string
                                            examples:
                                              - My Option 1
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: The type settings for the Custom Field
                                          type: object
                                          properties:
                                            allow_multiple_selection:
                                              description: Indicates if the Custom Field supports selecting multiple values
                                              type: boolean
                                              examples:
                                                - true
                                            managed_by_integrations:
                                              description: Indicates if the Custom Field options are only managed by integrations
                                              type: boolean
                                              examples:
                                                - true
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - TEXT
                                      examples:
                                        - TEXT
                                    value:
                                      description: The current value of the Custom Field in this resource
                                      type:
                                        - string
                                        - 'null'
                                      examples:
                                        - abc
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: >-
                                            The type settings for the Custom Field (Empty for Custom Fields of type
                                            TEXT)
                                          type: object
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - BOOLEAN
                                      examples:
                                        - BOOLEAN
                                    value:
                                      description: The current value of the Custom Field in this resource
                                      type:
                                        - boolean
                                        - 'null'
                                      examples:
                                        - true
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: >-
                                            The type settings for the Custom Field (There are none for the Custom Field
                                            Boolean type)
                                          type: object
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - RELATIONSHIP
                                      examples:
                                        - RELATIONSHIP
                                    value:
                                      description: The current values of the Custom Field in this resource
                                      type:
                                        - array
                                        - 'null'
                                      items:
                                        type: object
                                        properties:
                                          related_to_type:
                                            description: The type of object that is selected as the Custom Field Values
                                            type: string
                                            enum:
                                              - CLIENT
                                              - CONTACT
                                            examples:
                                              - CLIENT
                                          related_to_id:
                                            description: The ID of object that is selected as the Custom Field Value
                                            type: integer
                                            examples:
                                              - 123
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: The type settings for the Custom Field
                                          type: object
                                          properties:
                                            allow_multiple_selection:
                                              description: Indicates if the Custom Field allows multiple selection
                                              type: boolean
                                              examples:
                                                - false
                                            relationship_object:
                                              description: The type of object that is selected as the Custom Field Values
                                              type: string
                                              enum:
                                                - CLIENT
                                                - CONTACT
                                              examples:
                                                - CLIENT
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - DATETIME
                                      examples:
                                        - DATETIME
                                    value:
                                      description: The current value of the Custom Field in this resource
                                      type:
                                        - string
                                        - 'null'
                                      format: date-time
                                      examples:
                                        - '2025-12-12 12:39:00'
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: The type settings for the Custom Field
                                          type: object
                                          properties:
                                            allow_past_dates:
                                              description: Indicates if this Custom Field support past dates
                                              type: boolean
                                              examples:
                                                - false
                                            allow_future_dates:
                                              description: Indicates if this Custom Field support future dates
                                              type: boolean
                                              examples:
                                                - true
                                - type: object
                                  properties:
                                    id:
                                      description: The unique identifier for the Custom Field
                                      type: integer
                                      examples:
                                        - 123
                                    field_type:
                                      description: The type of the Custom Field
                                      type: string
                                      enum:
                                        - NUMBER
                                      examples:
                                        - NUMBER
                                    value:
                                      description: The current value of the Custom Field in this resource
                                      type:
                                        - integer
                                        - 'null'
                                      examples:
                                        - 12
                                    configs:
                                      type: object
                                      properties:
                                        label:
                                          description: The label for the Custom Field
                                          type: string
                                          examples:
                                            - My field X
                                        code:
                                          description: The unique code for the Custom Field
                                          type: string
                                          examples:
                                            - C01
                                        required:
                                          description: Specifies if the Custom Field is required
                                          type: boolean
                                          examples:
                                            - true
                                        are_values_readonly:
                                          description: >-
                                            Specifies if the Custom Field values are read only (so only integrations can
                                            set them).
                                          type: boolean
                                          examples:
                                            - false
                                        archived_at:
                                          description: >-
                                            Indicates when the custom field was archived for this object type. Objects
                                            that belong to the archived type will still display the custom field value
                                            if it was configured before the archiving.
                                          type:
                                            - string
                                            - 'null'
                                          format: date-time
                                          examples:
                                            - '2025-03-12 12:12:12'
                                        type_settings:
                                          description: The type settings for the Custom Field
                                          type: object
                                          properties:
                                            min:
                                              description: Indicates the minimum value for the Custom Field
                                              type:
                                                - integer
                                                - 'null'
                                              examples:
                                                - 1
                                            max:
                                              description: Indicates the maximum value for the Custom Field
                                              type:
                                                - integer
                                                - 'null'
                                              examples:
                                                - 3
                              discriminator:
                                propertyName: field_type
                  included:
                    description: >
                      List of expanded relationships for the Sell Order (Sale).


                      Items available in this list will vary depending on the value supplied in `expanded` query
                      parameter.
                    type: array
                    items:
                      anyOf:
                        - title: Entity
                          description: Entity model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Supplier
                              type: string
                              examples:
                                - '1'
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - entity
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                entity_id:
                                  type: integer
                                name:
                                  type: string
                                email:
                                  type: string
                                site:
                                  type: string
                                phone:
                                  type: string
                                cellphone:
                                  type: string
                                address:
                                  type: string
                                nib:
                                  type: string
                                nif:
                                  type: string
                                report_email:
                                  type: string
                                language:
                                  type: string
                                currency:
                                  type: string
                                license:
                                  type: string
                                  enum:
                                    - ASSISTANCE
                                    - CHURNED
                                    - COMPLEX
                                    - CSENTITY
                                    - DISTRIBUTED
                                    - HOTEL
                                    - NONE
                                    - PARTNER
                                    - PLACECHECKUP
                                profile_picture:
                                  type: string
                                entity_uuid:
                                  type: string
                                vat_rate:
                                  type: number
                                colour:
                                  type: string
                        - title: Operator
                          description: Operator model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Operator
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - operator
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                operator_id:
                                  description: ID of the Operator
                                  type: integer
                                  readOnly: true
                                operator_uuid:
                                  description: Uuid of the Operator
                                  type: string
                                  format: uuid
                                  readOnly: true
                                full_name:
                                  type: string
                                email:
                                  type: string
                                  format: email
                                phone:
                                  type:
                                    - string
                                    - 'null'
                                cellphone:
                                  type:
                                    - string
                                    - 'null'
                                account:
                                  description: Type of account which determines the access permission level.
                                  type: string
                                  enum:
                                    - admin
                                    - manager
                                    - technician
                                    - operator
                                    - reporter
                                language:
                                  type: string
                                  enum:
                                    - ar
                                    - ca
                                    - da_dk
                                    - en
                                    - es
                                    - fr_fr
                                    - pl_pl
                                    - pt_br
                                    - pt_pt
                                    - ko
                                    - zh_cn
                                    - nl_nl
                                    - de_de
                                cost_per_hour:
                                  type: number
                                  minimum: 0
                                  examples:
                                    - 10
                                warehouse_id:
                                  description: ID of the warehouse associated to the Operator by default.
                                  type: integer
                                entity_id:
                                  type: integer
                                  readOnly: true
                                timezone:
                                  description: >
                                    Valid PHP timezone identifier. See the full list here:
                                    https://www.php.net/manual/en/timezones.php.
                                  type: string
                                  examples:
                                    - Europe/Lisbon
                                is_from_network:
                                  type: boolean
                                created_at:
                                  type: string
                                  format: date-time
                                phone_country_code:
                                  type: string
                                  examples:
                                    - US
                                is_first_web_login:
                                  type:
                                    - boolean
                                    - 'null'
                                  readOnly: true
                                status:
                                  type: string
                                  enum:
                                    - WORKING
                                    - AVAILABLE
                                    - OFFLINE
                                  examples:
                                    - WORKING
                            meta:
                              type: object
                              properties:
                                custom_fields:
                                  type:
                                    - object
                                    - 'null'
                                  additionalProperties:
                                    oneOf:
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - SELECT
                                            examples:
                                              - SELECT
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                option_id:
                                                  description: The ID of the selected option
                                                  type: integer
                                                  examples:
                                                    - 123
                                                option_code:
                                                  description: The code of the selected option
                                                  type:
                                                    - string
                                                    - 'null'
                                                  examples:
                                                    - OP01
                                                value:
                                                  description: The value of the selected option
                                                  type: string
                                                  examples:
                                                    - My Option 1
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field supports selecting multiple values
                                                    type: boolean
                                                    examples:
                                                      - true
                                                  managed_by_integrations:
                                                    description: >-
                                                      Indicates if the Custom Field options are only managed by
                                                      integrations
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - TEXT
                                            examples:
                                              - TEXT
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            examples:
                                              - abc
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (Empty for Custom Fields of
                                                  type TEXT)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - BOOLEAN
                                            examples:
                                              - BOOLEAN
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - boolean
                                              - 'null'
                                            examples:
                                              - true
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (There are none for the Custom
                                                  Field Boolean type)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - RELATIONSHIP
                                            examples:
                                              - RELATIONSHIP
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                related_to_type:
                                                  description: The type of object that is selected as the Custom Field Values
                                                  type: string
                                                  enum:
                                                    - CLIENT
                                                    - CONTACT
                                                  examples:
                                                    - CLIENT
                                                related_to_id:
                                                  description: The ID of object that is selected as the Custom Field Value
                                                  type: integer
                                                  examples:
                                                    - 123
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field allows multiple selection
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  relationship_object:
                                                    description: The type of object that is selected as the Custom Field Values
                                                    type: string
                                                    enum:
                                                      - CLIENT
                                                      - CONTACT
                                                    examples:
                                                      - CLIENT
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - DATETIME
                                            examples:
                                              - DATETIME
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-12-12 12:39:00'
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_past_dates:
                                                    description: Indicates if this Custom Field support past dates
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  allow_future_dates:
                                                    description: Indicates if this Custom Field support future dates
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - NUMBER
                                            examples:
                                              - NUMBER
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - integer
                                              - 'null'
                                            examples:
                                              - 12
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  min:
                                                    description: Indicates the minimum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 1
                                                  max:
                                                    description: Indicates the maximum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 3
                                    discriminator:
                                      propertyName: field_type
                        - title: Operator
                          description: Operator model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Operator
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - operator
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                operator_id:
                                  description: ID of the Operator
                                  type: integer
                                  readOnly: true
                                operator_uuid:
                                  description: Uuid of the Operator
                                  type: string
                                  format: uuid
                                  readOnly: true
                                full_name:
                                  type: string
                                email:
                                  type: string
                                  format: email
                                phone:
                                  type:
                                    - string
                                    - 'null'
                                cellphone:
                                  type:
                                    - string
                                    - 'null'
                                account:
                                  description: Type of account which determines the access permission level.
                                  type: string
                                  enum:
                                    - admin
                                    - manager
                                    - technician
                                    - operator
                                    - reporter
                                language:
                                  type: string
                                  enum:
                                    - ar
                                    - ca
                                    - da_dk
                                    - en
                                    - es
                                    - fr_fr
                                    - pl_pl
                                    - pt_br
                                    - pt_pt
                                    - ko
                                    - zh_cn
                                    - nl_nl
                                    - de_de
                                cost_per_hour:
                                  type: number
                                  minimum: 0
                                  examples:
                                    - 10
                                warehouse_id:
                                  description: ID of the warehouse associated to the Operator by default.
                                  type: integer
                                entity_id:
                                  type: integer
                                  readOnly: true
                                timezone:
                                  description: >
                                    Valid PHP timezone identifier. See the full list here:
                                    https://www.php.net/manual/en/timezones.php.
                                  type: string
                                  examples:
                                    - Europe/Lisbon
                                is_from_network:
                                  type: boolean
                                created_at:
                                  type: string
                                  format: date-time
                                phone_country_code:
                                  type: string
                                  examples:
                                    - US
                                is_first_web_login:
                                  type:
                                    - boolean
                                    - 'null'
                                  readOnly: true
                                status:
                                  type: string
                                  enum:
                                    - WORKING
                                    - AVAILABLE
                                    - OFFLINE
                                  examples:
                                    - WORKING
                            meta:
                              type: object
                              properties:
                                custom_fields:
                                  type:
                                    - object
                                    - 'null'
                                  additionalProperties:
                                    oneOf:
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - SELECT
                                            examples:
                                              - SELECT
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                option_id:
                                                  description: The ID of the selected option
                                                  type: integer
                                                  examples:
                                                    - 123
                                                option_code:
                                                  description: The code of the selected option
                                                  type:
                                                    - string
                                                    - 'null'
                                                  examples:
                                                    - OP01
                                                value:
                                                  description: The value of the selected option
                                                  type: string
                                                  examples:
                                                    - My Option 1
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field supports selecting multiple values
                                                    type: boolean
                                                    examples:
                                                      - true
                                                  managed_by_integrations:
                                                    description: >-
                                                      Indicates if the Custom Field options are only managed by
                                                      integrations
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - TEXT
                                            examples:
                                              - TEXT
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            examples:
                                              - abc
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (Empty for Custom Fields of
                                                  type TEXT)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - BOOLEAN
                                            examples:
                                              - BOOLEAN
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - boolean
                                              - 'null'
                                            examples:
                                              - true
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (There are none for the Custom
                                                  Field Boolean type)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - RELATIONSHIP
                                            examples:
                                              - RELATIONSHIP
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                related_to_type:
                                                  description: The type of object that is selected as the Custom Field Values
                                                  type: string
                                                  enum:
                                                    - CLIENT
                                                    - CONTACT
                                                  examples:
                                                    - CLIENT
                                                related_to_id:
                                                  description: The ID of object that is selected as the Custom Field Value
                                                  type: integer
                                                  examples:
                                                    - 123
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field allows multiple selection
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  relationship_object:
                                                    description: The type of object that is selected as the Custom Field Values
                                                    type: string
                                                    enum:
                                                      - CLIENT
                                                      - CONTACT
                                                    examples:
                                                      - CLIENT
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - DATETIME
                                            examples:
                                              - DATETIME
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-12-12 12:39:00'
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_past_dates:
                                                    description: Indicates if this Custom Field support past dates
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  allow_future_dates:
                                                    description: Indicates if this Custom Field support future dates
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - NUMBER
                                            examples:
                                              - NUMBER
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - integer
                                              - 'null'
                                            examples:
                                              - 12
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  min:
                                                    description: Indicates the minimum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 1
                                                  max:
                                                    description: Indicates the maximum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 3
                                    discriminator:
                                      propertyName: field_type
                        - title: Operator
                          description: Operator model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Operator
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - operator
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                operator_id:
                                  description: ID of the Operator
                                  type: integer
                                  readOnly: true
                                operator_uuid:
                                  description: Uuid of the Operator
                                  type: string
                                  format: uuid
                                  readOnly: true
                                full_name:
                                  type: string
                                email:
                                  type: string
                                  format: email
                                phone:
                                  type:
                                    - string
                                    - 'null'
                                cellphone:
                                  type:
                                    - string
                                    - 'null'
                                account:
                                  description: Type of account which determines the access permission level.
                                  type: string
                                  enum:
                                    - admin
                                    - manager
                                    - technician
                                    - operator
                                    - reporter
                                language:
                                  type: string
                                  enum:
                                    - ar
                                    - ca
                                    - da_dk
                                    - en
                                    - es
                                    - fr_fr
                                    - pl_pl
                                    - pt_br
                                    - pt_pt
                                    - ko
                                    - zh_cn
                                    - nl_nl
                                    - de_de
                                cost_per_hour:
                                  type: number
                                  minimum: 0
                                  examples:
                                    - 10
                                warehouse_id:
                                  description: ID of the warehouse associated to the Operator by default.
                                  type: integer
                                entity_id:
                                  type: integer
                                  readOnly: true
                                timezone:
                                  description: >
                                    Valid PHP timezone identifier. See the full list here:
                                    https://www.php.net/manual/en/timezones.php.
                                  type: string
                                  examples:
                                    - Europe/Lisbon
                                is_from_network:
                                  type: boolean
                                created_at:
                                  type: string
                                  format: date-time
                                phone_country_code:
                                  type: string
                                  examples:
                                    - US
                                is_first_web_login:
                                  type:
                                    - boolean
                                    - 'null'
                                  readOnly: true
                                status:
                                  type: string
                                  enum:
                                    - WORKING
                                    - AVAILABLE
                                    - OFFLINE
                                  examples:
                                    - WORKING
                            meta:
                              type: object
                              properties:
                                custom_fields:
                                  type:
                                    - object
                                    - 'null'
                                  additionalProperties:
                                    oneOf:
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - SELECT
                                            examples:
                                              - SELECT
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                option_id:
                                                  description: The ID of the selected option
                                                  type: integer
                                                  examples:
                                                    - 123
                                                option_code:
                                                  description: The code of the selected option
                                                  type:
                                                    - string
                                                    - 'null'
                                                  examples:
                                                    - OP01
                                                value:
                                                  description: The value of the selected option
                                                  type: string
                                                  examples:
                                                    - My Option 1
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field supports selecting multiple values
                                                    type: boolean
                                                    examples:
                                                      - true
                                                  managed_by_integrations:
                                                    description: >-
                                                      Indicates if the Custom Field options are only managed by
                                                      integrations
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - TEXT
                                            examples:
                                              - TEXT
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            examples:
                                              - abc
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (Empty for Custom Fields of
                                                  type TEXT)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - BOOLEAN
                                            examples:
                                              - BOOLEAN
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - boolean
                                              - 'null'
                                            examples:
                                              - true
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (There are none for the Custom
                                                  Field Boolean type)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - RELATIONSHIP
                                            examples:
                                              - RELATIONSHIP
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                related_to_type:
                                                  description: The type of object that is selected as the Custom Field Values
                                                  type: string
                                                  enum:
                                                    - CLIENT
                                                    - CONTACT
                                                  examples:
                                                    - CLIENT
                                                related_to_id:
                                                  description: The ID of object that is selected as the Custom Field Value
                                                  type: integer
                                                  examples:
                                                    - 123
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field allows multiple selection
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  relationship_object:
                                                    description: The type of object that is selected as the Custom Field Values
                                                    type: string
                                                    enum:
                                                      - CLIENT
                                                      - CONTACT
                                                    examples:
                                                      - CLIENT
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - DATETIME
                                            examples:
                                              - DATETIME
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-12-12 12:39:00'
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_past_dates:
                                                    description: Indicates if this Custom Field support past dates
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  allow_future_dates:
                                                    description: Indicates if this Custom Field support future dates
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - NUMBER
                                            examples:
                                              - NUMBER
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - integer
                                              - 'null'
                                            examples:
                                              - 12
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  min:
                                                    description: Indicates the minimum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 1
                                                  max:
                                                    description: Indicates the maximum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 3
                                    discriminator:
                                      propertyName: field_type
                        - title: Operator
                          description: Operator model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Operator
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - operator
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                operator_id:
                                  description: ID of the Operator
                                  type: integer
                                  readOnly: true
                                operator_uuid:
                                  description: Uuid of the Operator
                                  type: string
                                  format: uuid
                                  readOnly: true
                                full_name:
                                  type: string
                                email:
                                  type: string
                                  format: email
                                phone:
                                  type:
                                    - string
                                    - 'null'
                                cellphone:
                                  type:
                                    - string
                                    - 'null'
                                account:
                                  description: Type of account which determines the access permission level.
                                  type: string
                                  enum:
                                    - admin
                                    - manager
                                    - technician
                                    - operator
                                    - reporter
                                language:
                                  type: string
                                  enum:
                                    - ar
                                    - ca
                                    - da_dk
                                    - en
                                    - es
                                    - fr_fr
                                    - pl_pl
                                    - pt_br
                                    - pt_pt
                                    - ko
                                    - zh_cn
                                    - nl_nl
                                    - de_de
                                cost_per_hour:
                                  type: number
                                  minimum: 0
                                  examples:
                                    - 10
                                warehouse_id:
                                  description: ID of the warehouse associated to the Operator by default.
                                  type: integer
                                entity_id:
                                  type: integer
                                  readOnly: true
                                timezone:
                                  description: >
                                    Valid PHP timezone identifier. See the full list here:
                                    https://www.php.net/manual/en/timezones.php.
                                  type: string
                                  examples:
                                    - Europe/Lisbon
                                is_from_network:
                                  type: boolean
                                created_at:
                                  type: string
                                  format: date-time
                                phone_country_code:
                                  type: string
                                  examples:
                                    - US
                                is_first_web_login:
                                  type:
                                    - boolean
                                    - 'null'
                                  readOnly: true
                                status:
                                  type: string
                                  enum:
                                    - WORKING
                                    - AVAILABLE
                                    - OFFLINE
                                  examples:
                                    - WORKING
                            meta:
                              type: object
                              properties:
                                custom_fields:
                                  type:
                                    - object
                                    - 'null'
                                  additionalProperties:
                                    oneOf:
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - SELECT
                                            examples:
                                              - SELECT
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                option_id:
                                                  description: The ID of the selected option
                                                  type: integer
                                                  examples:
                                                    - 123
                                                option_code:
                                                  description: The code of the selected option
                                                  type:
                                                    - string
                                                    - 'null'
                                                  examples:
                                                    - OP01
                                                value:
                                                  description: The value of the selected option
                                                  type: string
                                                  examples:
                                                    - My Option 1
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field supports selecting multiple values
                                                    type: boolean
                                                    examples:
                                                      - true
                                                  managed_by_integrations:
                                                    description: >-
                                                      Indicates if the Custom Field options are only managed by
                                                      integrations
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - TEXT
                                            examples:
                                              - TEXT
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            examples:
                                              - abc
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (Empty for Custom Fields of
                                                  type TEXT)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - BOOLEAN
                                            examples:
                                              - BOOLEAN
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - boolean
                                              - 'null'
                                            examples:
                                              - true
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (There are none for the Custom
                                                  Field Boolean type)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - RELATIONSHIP
                                            examples:
                                              - RELATIONSHIP
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                related_to_type:
                                                  description: The type of object that is selected as the Custom Field Values
                                                  type: string
                                                  enum:
                                                    - CLIENT
                                                    - CONTACT
                                                  examples:
                                                    - CLIENT
                                                related_to_id:
                                                  description: The ID of object that is selected as the Custom Field Value
                                                  type: integer
                                                  examples:
                                                    - 123
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field allows multiple selection
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  relationship_object:
                                                    description: The type of object that is selected as the Custom Field Values
                                                    type: string
                                                    enum:
                                                      - CLIENT
                                                      - CONTACT
                                                    examples:
                                                      - CLIENT
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - DATETIME
                                            examples:
                                              - DATETIME
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-12-12 12:39:00'
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_past_dates:
                                                    description: Indicates if this Custom Field support past dates
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  allow_future_dates:
                                                    description: Indicates if this Custom Field support future dates
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - NUMBER
                                            examples:
                                              - NUMBER
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - integer
                                              - 'null'
                                            examples:
                                              - 12
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  min:
                                                    description: Indicates the minimum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 1
                                                  max:
                                                    description: Indicates the maximum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 3
                                    discriminator:
                                      propertyName: field_type
                        - title: Operator
                          description: Operator model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Operator
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - operator
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                operator_id:
                                  description: ID of the Operator
                                  type: integer
                                  readOnly: true
                                operator_uuid:
                                  description: Uuid of the Operator
                                  type: string
                                  format: uuid
                                  readOnly: true
                                full_name:
                                  type: string
                                email:
                                  type: string
                                  format: email
                                phone:
                                  type:
                                    - string
                                    - 'null'
                                cellphone:
                                  type:
                                    - string
                                    - 'null'
                                account:
                                  description: Type of account which determines the access permission level.
                                  type: string
                                  enum:
                                    - admin
                                    - manager
                                    - technician
                                    - operator
                                    - reporter
                                language:
                                  type: string
                                  enum:
                                    - ar
                                    - ca
                                    - da_dk
                                    - en
                                    - es
                                    - fr_fr
                                    - pl_pl
                                    - pt_br
                                    - pt_pt
                                    - ko
                                    - zh_cn
                                    - nl_nl
                                    - de_de
                                cost_per_hour:
                                  type: number
                                  minimum: 0
                                  examples:
                                    - 10
                                warehouse_id:
                                  description: ID of the warehouse associated to the Operator by default.
                                  type: integer
                                entity_id:
                                  type: integer
                                  readOnly: true
                                timezone:
                                  description: >
                                    Valid PHP timezone identifier. See the full list here:
                                    https://www.php.net/manual/en/timezones.php.
                                  type: string
                                  examples:
                                    - Europe/Lisbon
                                is_from_network:
                                  type: boolean
                                created_at:
                                  type: string
                                  format: date-time
                                phone_country_code:
                                  type: string
                                  examples:
                                    - US
                                is_first_web_login:
                                  type:
                                    - boolean
                                    - 'null'
                                  readOnly: true
                                status:
                                  type: string
                                  enum:
                                    - WORKING
                                    - AVAILABLE
                                    - OFFLINE
                                  examples:
                                    - WORKING
                            meta:
                              type: object
                              properties:
                                custom_fields:
                                  type:
                                    - object
                                    - 'null'
                                  additionalProperties:
                                    oneOf:
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - SELECT
                                            examples:
                                              - SELECT
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                option_id:
                                                  description: The ID of the selected option
                                                  type: integer
                                                  examples:
                                                    - 123
                                                option_code:
                                                  description: The code of the selected option
                                                  type:
                                                    - string
                                                    - 'null'
                                                  examples:
                                                    - OP01
                                                value:
                                                  description: The value of the selected option
                                                  type: string
                                                  examples:
                                                    - My Option 1
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field supports selecting multiple values
                                                    type: boolean
                                                    examples:
                                                      - true
                                                  managed_by_integrations:
                                                    description: >-
                                                      Indicates if the Custom Field options are only managed by
                                                      integrations
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - TEXT
                                            examples:
                                              - TEXT
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            examples:
                                              - abc
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (Empty for Custom Fields of
                                                  type TEXT)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - BOOLEAN
                                            examples:
                                              - BOOLEAN
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - boolean
                                              - 'null'
                                            examples:
                                              - true
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (There are none for the Custom
                                                  Field Boolean type)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - RELATIONSHIP
                                            examples:
                                              - RELATIONSHIP
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                related_to_type:
                                                  description: The type of object that is selected as the Custom Field Values
                                                  type: string
                                                  enum:
                                                    - CLIENT
                                                    - CONTACT
                                                  examples:
                                                    - CLIENT
                                                related_to_id:
                                                  description: The ID of object that is selected as the Custom Field Value
                                                  type: integer
                                                  examples:
                                                    - 123
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field allows multiple selection
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  relationship_object:
                                                    description: The type of object that is selected as the Custom Field Values
                                                    type: string
                                                    enum:
                                                      - CLIENT
                                                      - CONTACT
                                                    examples:
                                                      - CLIENT
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - DATETIME
                                            examples:
                                              - DATETIME
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-12-12 12:39:00'
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_past_dates:
                                                    description: Indicates if this Custom Field support past dates
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  allow_future_dates:
                                                    description: Indicates if this Custom Field support future dates
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - NUMBER
                                            examples:
                                              - NUMBER
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - integer
                                              - 'null'
                                            examples:
                                              - 12
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  min:
                                                    description: Indicates the minimum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 1
                                                  max:
                                                    description: Indicates the maximum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 3
                                    discriminator:
                                      propertyName: field_type
                        - title: Clients
                          description: Client model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Client
                              type: string
                              examples:
                                - '123'
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - client
                              examples:
                                - client
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                client_id:
                                  description: ID of the Client
                                  type: integer
                                  examples:
                                    - 123
                                client_uuid:
                                  description: UUID of the Client
                                  type: string
                                  format: uuid
                                  examples:
                                    - e632afe8-a1bf-4702-b5bd-b1163861ba51
                                name:
                                  description: Client Name
                                  type: string
                                  examples:
                                    - John Doe
                                code:
                                  description: Client Code
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - JD
                                nif:
                                  description: NIF/ VAT Number of the Client
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - '1234566789'
                                postal_code:
                                  description: Postal Code of the Client
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - 1234-567
                                city:
                                  description: City of the Client
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - Lisbon
                                observations:
                                  description: Additional information
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - abc
                                address:
                                  description: Address of the Client
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - abc
                                country:
                                  description: Country of the Client
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - PT
                                created_at:
                                  description: The datetime of the creation of the Client
                                  type: string
                                  format: date-time
                                  examples:
                                    - '2020-12-03T12:45:00'
                                  readOnly: true
                                updated_at:
                                  description: The datetime of the last update of the Client
                                  type: string
                                  format: date-time
                                  examples:
                                    - '2020-12-03T12:45:00'
                                  readOnly: true
                                has_handshake:
                                  description: Indicates if this Client is "connected" to work on Infraspeak Network.
                                  type: boolean
                                  examples:
                                    - true
                                my_company:
                                  description: Indicates whether it is the entity's default client
                                  type: boolean
                                  examples:
                                    - true
                            relationships:
                              description: The relationships of the Client (Only present when expanded in the request)
                              type: object
                              properties:
                                buildings:
                                  description: The Buildings associated to the Client
                                  type: object
                                contacts:
                                  description: The Contacts associated to the Client
                                  type: object
                                files:
                                  description: The Files associated to the Client
                                  type: object
                                profilePicture:
                                  description: The profile picture of the the Client
                                  type: object
                                operators:
                                  description: The Operators associated to the Client
                                  type: object
                                handshake:
                                  description: The Handshake associated to the Client
                                  type: object
                          required:
                            - id
                            - type
                            - attributes
                        - title: Contact
                          description: Contact model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Contact
                              type: string
                              readOnly: true
                              examples:
                                - '123'
                            type:
                              description: Model type
                              type: string
                              enum:
                                - contact
                              readOnly: true
                              examples:
                                - contact
                            attributes:
                              type: object
                              properties:
                                contact_id:
                                  description: ID of the Contact
                                  type: integer
                                  readOnly: true
                                  examples:
                                    - 123
                                entity_id:
                                  description: ID of the Entity
                                  type: integer
                                  readOnly: true
                                  examples:
                                    - 123
                                cellphone:
                                  description: The cellphone number of the Contact
                                  type: string
                                  examples:
                                    - '123456789'
                                language:
                                  description: The language of the Contact
                                  type: string
                                  examples:
                                    - pt_br
                                email:
                                  description: The email of the Contact
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - foo@bar.com
                                full_name:
                                  description: The full name of the Contact
                                  type: string
                                  examples:
                                    - Jose Pinhal
                                phone:
                                  description: The phone number of the Contact
                                  type: string
                                  examples:
                                    - '123456789'
                                is_direct_user:
                                  description: Indicates whether the contact is a Direct user
                                  type: boolean
                                  examples:
                                    - false
                                has_access:
                                  description: Indicates whether the contact has access to Direct
                                  oneOf:
                                    - type: boolean
                                    - type: integer
                                      enum:
                                        - 0
                                        - 1
                                  examples:
                                    - false
                            relationships:
                              description: The relationships of the Contact
                              type: object
                              properties:
                                suppliers:
                                  description: The Suppliers associated to the Contact
                                  type: object
                                clients:
                                  description: The Clients associated to the Contact
                                  type: object
                                extensionsPermissions:
                                  description: The Extensions Permissions associated to the Contact
                                  type: object
                                locals:
                                  description: The Locations associated to the Contact
                                  type: object
                                profilePicture:
                                  description: The profile picture of the Contact
                                  type: object
                                user:
                                  description: The user associated to the Contact
                                  type: object
                            meta:
                              type: object
                              properties:
                                custom_fields:
                                  type:
                                    - object
                                    - 'null'
                                  additionalProperties:
                                    oneOf:
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - SELECT
                                            examples:
                                              - SELECT
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                option_id:
                                                  description: The ID of the selected option
                                                  type: integer
                                                  examples:
                                                    - 123
                                                option_code:
                                                  description: The code of the selected option
                                                  type:
                                                    - string
                                                    - 'null'
                                                  examples:
                                                    - OP01
                                                value:
                                                  description: The value of the selected option
                                                  type: string
                                                  examples:
                                                    - My Option 1
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field supports selecting multiple values
                                                    type: boolean
                                                    examples:
                                                      - true
                                                  managed_by_integrations:
                                                    description: >-
                                                      Indicates if the Custom Field options are only managed by
                                                      integrations
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - TEXT
                                            examples:
                                              - TEXT
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            examples:
                                              - abc
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (Empty for Custom Fields of
                                                  type TEXT)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - BOOLEAN
                                            examples:
                                              - BOOLEAN
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - boolean
                                              - 'null'
                                            examples:
                                              - true
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (There are none for the Custom
                                                  Field Boolean type)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - RELATIONSHIP
                                            examples:
                                              - RELATIONSHIP
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                related_to_type:
                                                  description: The type of object that is selected as the Custom Field Values
                                                  type: string
                                                  enum:
                                                    - CLIENT
                                                    - CONTACT
                                                  examples:
                                                    - CLIENT
                                                related_to_id:
                                                  description: The ID of object that is selected as the Custom Field Value
                                                  type: integer
                                                  examples:
                                                    - 123
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field allows multiple selection
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  relationship_object:
                                                    description: The type of object that is selected as the Custom Field Values
                                                    type: string
                                                    enum:
                                                      - CLIENT
                                                      - CONTACT
                                                    examples:
                                                      - CLIENT
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - DATETIME
                                            examples:
                                              - DATETIME
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-12-12 12:39:00'
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_past_dates:
                                                    description: Indicates if this Custom Field support past dates
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  allow_future_dates:
                                                    description: Indicates if this Custom Field support future dates
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - NUMBER
                                            examples:
                                              - NUMBER
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - integer
                                              - 'null'
                                            examples:
                                              - 12
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  min:
                                                    description: Indicates the minimum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 1
                                                  max:
                                                    description: Indicates the maximum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 3
                                    discriminator:
                                      propertyName: field_type
                          required:
                            - id
                            - type
                            - attributes
                        - title: Failure
                          description: Failure model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Failure
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - failure
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                failure_id:
                                  description: ID of the Failure
                                  type: integer
                                  readOnly: true
                                  examples:
                                    - 1
                                uuid:
                                  description: Universally Unique Identifier for the Failure
                                  type: string
                                  format: uuid
                                  readOnly: true
                                problem_id:
                                  description: ID of the associated problem
                                  type: integer
                                status:
                                  type: string
                                  enum:
                                    - WAITING_APPROVAL
                                    - WAITING_RESOLUTION
                                    - IN_RESOLUTION
                                    - PAUSED
                                    - COMPLETED
                                    - ARCHIVED
                                  readOnly: true
                                start_date:
                                  type: string
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T08:48:00.000Z'
                                completed_date:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T17:12:00.000Z'
                                approved_date:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T09:30:00.000Z'
                                paused_date:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T13:05:00.000Z'
                                description:
                                  type: string
                                  examples:
                                    - Needs replacement
                                last_status_description:
                                  type: string
                                  examples:
                                    - Completed
                                observations:
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - Needs a new part
                                code:
                                  type: string
                                  examples:
                                    - WO2022
                                fts_vector:
                                  description: Denormalized data of a Failure
                                  type: string
                                priority:
                                  description: Failure priority number being 1 the lowest priority and 4 the highest priority.
                                  type: integer
                                  enum:
                                    - 1
                                    - 2
                                    - 3
                                    - 4
                                client_id:
                                  description: ID of the associated client defined according to the respective `local_id`.
                                  type: integer
                                  readOnly: true
                                entity_id:
                                  description: ID of the Entity of the Failure
                                  type: integer
                                  readOnly: true
                                metering_registry_id:
                                  description: ID of a possible associated metering registry
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                local_id:
                                  description: ID of the location associated to the Failure
                                  type: integer
                                paused_reason_id:
                                  description: ID of the paused reason associated to the Failure
                                  type: integer
                                external_id:
                                  description: External ID to be associated to the Failure
                                  type:
                                    - string
                                    - 'null'
                                report_name:
                                  description: Name of who reported the Failure
                                  type: string
                                solved:
                                  description: Indicates whether the Failure was closed successfully or not
                                  type: boolean
                                  readOnly: true
                                  default: false
                                confirmed:
                                  description: Indicates whether the Failure is confirmed or not
                                  type: boolean
                                  readOnly: true
                                  default: false
                                started:
                                  description: Indicates whether the Failure is started or not
                                  type: boolean
                                  readOnly: true
                                  default: false
                                paused:
                                  description: Indicates whether the Failure is paused or not
                                  type: boolean
                                  readOnly: true
                                  default: false
                                completed:
                                  description: Indicates whether the Failure is completed or not
                                  type: boolean
                                  readOnly: true
                                  default: false
                                archived:
                                  description: Indicates whether the Failure is archived or not
                                  type: boolean
                                  readOnly: true
                                  default: false
                                approved:
                                  description: Indicates whether the Failure is approved or not
                                  type: boolean
                                  readOnly: true
                                  default: false
                                next_schedule:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-29T10:30:00.000Z'
                                message_count:
                                  type: integer
                                  minimum: 0
                                  default: 0
                                  examples:
                                    - 3
                                time_statistics:
                                  type: object
                                  properties:
                                    approved_date:
                                      type:
                                        - string
                                        - 'null'
                                      format: date-time
                                      readOnly: true
                                      examples:
                                        - '2020-08-28T09:30:00.000Z'
                                    last_completed_date:
                                      type:
                                        - string
                                        - 'null'
                                      format: date-time
                                      readOnly: true
                                      examples:
                                        - '2020-08-28T17:12:00.000Z'
                                    last_paused_date:
                                      type:
                                        - string
                                        - 'null'
                                      format: date-time
                                      readOnly: true
                                      examples:
                                        - '2020-08-28T13:05:00.000Z'
                                    started_date:
                                      type:
                                        - string
                                        - 'null'
                                      format: date-time
                                      readOnly: true
                                      examples:
                                        - '2020-08-28T09:45:00.000Z'
                                    time_to_approve:
                                      description: Duration it took to approve the Failure since reported in `ISO8601` format.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - P0Y0M0DT0H42M0S
                                    time_to_complete:
                                      description: Duration it took to complete the Failure since reported in `ISO8601` format.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - P0Y0M0DT8H24M0S
                                    time_to_complete_after_started:
                                      description: >-
                                        Duration it took to complete the Failure since the resolution started in
                                        `ISO8601` format.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - P0Y0M0DT7H27M0S
                                    time_to_start:
                                      description: >-
                                        Duration it took to start the Failure's resolution since reported in `ISO8601`
                                        format.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - P0Y0M0DT0H57M0S
                                    time_to_start_after_approved:
                                      description: >-
                                        Duration it took to start the Failure's resolution since approved in `ISO8601`
                                        format.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - P0Y0M0DT0H15M0S
                                    real_duration:
                                      description: Real duration of the Failure's resolution time in `ISO8601` format.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                      examples:
                                        - P0Y0M0DT7H27M0S
                                supplier_id:
                                  description: ID of the supplier associated to the Failure
                                  type: integer
                                signature_status:
                                  description: Indicates whether the Failure is signed or not
                                  type: string
                                  enum:
                                    - SIGNED
                                    - NOT_SIGNED
                                  default: NOT_SIGNED
                                last_status_change_date:
                                  type: string
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T09:30:00.000Z'
                                approved_by_id:
                                  description: ID of the operator who approved the Failure.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                completed_by_id:
                                  description: ID of the operator who completed the Failure.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                started_by_id:
                                  description: ID of the operator who started the Failure's resolution.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                paused_by_id:
                                  description: ID of the operator who paused the Failure's resolution.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                approved_by:
                                  description: Name of the operator who approved the Failure.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                completed_by:
                                  description: Name of the operator who completed the Failure.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                started_by:
                                  description: Name of the operator who started the Failure's resolution.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                paused_by:
                                  description: Name of the operator who paused the Failure's resolution.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                reported_by:
                                  description: Name of the operator who reported the Failure.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                manpower_duration:
                                  description: Duration of the Failure's manpower time in `ISO8601` format.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                  examples:
                                    - P0Y0M0DT7H27M0S
                                cost_center_id:
                                  description: ID of the cost center associated to the Failure
                                  type:
                                    - integer
                                    - 'null'
                                network_failure_id:
                                  description: ID of the Network Failure
                                  type: integer
                                  readOnly: true
                                  examples:
                                    - 1
                                created_at:
                                  type: string
                                  format: date-time
                                  readOnly: true
                                updated_at:
                                  type: string
                                  format: date-time
                                  readOnly: true
                                date_deleted:
                                  type: string
                                  format: date-time
                                  readOnly: true
                            relationships:
                              type: object
                              properties:
                                approvedBy:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                completedBy:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                createdBy:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                files:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - file
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                location:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - location
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                operator:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                          required:
                            - id
                            - type
                            - attributes
                        - title: File
                          description: File model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the File
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - file
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                file_id:
                                  description: File Id
                                  type: integer
                                  readOnly: true
                                file_uuid:
                                  description: File UUID
                                  type: string
                                  readOnly: true
                                related_to:
                                  description: Object which the File is related to
                                  type: string
                                  enum:
                                    - BUILDING
                                    - CATEGORY
                                    - CLIENT
                                    - ELEMENT
                                    - ELEMENT_REGISTRY
                                    - FAILURE
                                    - METERING_REGISTRY
                                    - OPERATOR
                                    - ORDER
                                    - QUOTE
                                    - QUOTE_REQUEST
                                    - RECEIVED_QUOTE
                                    - RECEIVED_QUOTE_REQUEST
                                    - REQUEST
                                    - SELL_ORDER
                                    - SUPPLIER
                                    - SCHEDULE_WORK
                                    - WORK
                                    - SCHEDULED_WORK
                                    - PURCHASE
                                    - PURCHASE_MATERIAL_LINE
                                    - PURCHASE_SERVICE_LINE
                                    - SALE
                                related_to_id:
                                  description: Relations Id
                                  type: integer
                                related_type:
                                  description: Object which the File is related to
                                  type: string
                                  enum:
                                    - BUILDING
                                    - CATEGORY
                                    - CLIENT
                                    - ELEMENT
                                    - ELEMENT_REGISTRY
                                    - FAILURE
                                    - METERING_REGISTRY
                                    - OPERATOR
                                    - ORDER
                                    - QUOTE
                                    - QUOTE_REQUEST
                                    - RECEIVED_QUOTE
                                    - RECEIVED_QUOTE_REQUEST
                                    - REQUEST
                                    - SELL_ORDER
                                    - SUPPLIER
                                    - SCHEDULE_WORK
                                    - WORK
                                  readOnly: true
                                file_label_id:
                                  description: File Label Id
                                  type:
                                    - integer
                                    - 'null'
                                name:
                                  description: File name
                                  type: string
                                  examples:
                                    - my_example_file
                                thumb:
                                  description: URL to the thumbnail, in case the File is an image.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                file_url:
                                  description: URL to the File
                                  type: string
                                  format: uri
                                  readOnly: true
                                description:
                                  type:
                                    - string
                                    - 'null'
                                expire_date:
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  readOnly: true
                                  examples:
                                    - '2020-08-28T17:12:00.000Z'
                                has_reminder:
                                  type: boolean
                                  readOnly: true
                                file_type:
                                  description: Internal type of the file
                                  type: string
                                  enum:
                                    - cad
                                    - compressed
                                    - file
                                    - image
                                    - office
                                    - other
                                    - pdf
                                    - signature
                                    - video
                                  readOnly: true
                                permission_to_technician:
                                  type: boolean
                                  default: true
                                permission_to_manager:
                                  type: boolean
                                  default: true
                                permission_to_direct:
                                  type: boolean
                                  default: false
                                extension:
                                  type: string
                                  enum:
                                    - 3gp
                                    - 3gpp
                                    - bin
                                    - bmp
                                    - cad
                                    - csv
                                    - doc
                                    - docx
                                    - gif
                                    - jpeg
                                    - jpg
                                    - kmz
                                    - mov
                                    - mp4
                                    - odf
                                    - odp
                                    - pdf
                                    - png
                                    - ppt
                                    - pptx
                                    - qt
                                    - rar
                                    - txt
                                    - xls
                                    - xlsx
                                    - zip
                                  readOnly: true
                                network_status:
                                  description: Show the network status of the file.
                                  type: string
                                  enum:
                                    - SHARED
                                    - RECEIVED
                                    - NOT_SHARED
                                shared_with_supplier:
                                  description: Show if the file is currently in a shared status with the supplier.
                                  type: boolean
                                shared_with_client:
                                  description: Show if the file is currently in a shared status with the client.
                                  type: boolean
                                file_size:
                                  type: integer
                                  readOnly: true
                                created_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                  readOnly: true
                          required:
                            - id
                            - type
                            - attributes
                        - title: Quote
                          description: Quote model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Quote.
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - quote
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                quote_id:
                                  description: ID of the Quote.
                                  type: integer
                                  readOnly: true
                                quote_uuid:
                                  description: UUID of the Quote.
                                  type:
                                    - string
                                    - 'null'
                                  format: uuid
                                  readOnly: true
                                code:
                                  description: Code of the Quote. Visible on Infraspeak platform.
                                  type: integer
                                  readOnly: true
                                client_id:
                                  description: ID of the Client associated to the quote.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                state:
                                  description: State of the Quote.
                                  type: string
                                  enum:
                                    - DRAFT
                                    - READY
                                    - ACCEPTED
                                    - DECLINED
                                    - CANCELLED
                                    - CONVERTED_TO_SALE
                                  default: DRAFT
                                  examples:
                                    - DRAFT
                                entity_id:
                                  type: integer
                                  readOnly: true
                                created_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: Creation date of the Quote
                                      readOnly: true
                                created_by:
                                  description: ID of the operator that created the Quote.
                                  type: integer
                                  readOnly: true
                                started_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: Date when Quote has started.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                started_by:
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                ready_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: Date Quote is marked as Awaiting.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                ready_by_id:
                                  description: ID of the user who marked the quote as Awaiting.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                ready_by_type:
                                  description: Type of user who marked the Quote as Awaiting.
                                  type:
                                    - string
                                    - 'null'
                                  enum:
                                    - OPERATOR
                                    - CONTACT
                                    - null
                                  default: OPERATOR
                                accepted_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: Date Quote is accepted.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                accepted_by_id:
                                  description: ID of the user who accepted the Quote.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                accepted_by_type:
                                  description: Type of user who accepted the Quote.
                                  type:
                                    - string
                                    - 'null'
                                  enum:
                                    - OPERATOR
                                    - CONTACT
                                    - null
                                  default: OPERATOR
                                declined_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: Date Quote was declined.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                declined_by_id:
                                  description: ID of the user who declined the quote.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                declined_by_type:
                                  description: Type of user who declined the Quote.
                                  type:
                                    - string
                                    - 'null'
                                  enum:
                                    - OPERATOR
                                    - CONTACT
                                    - null
                                  default: OPERATOR
                                cancelled_by:
                                  description: ID of the user who cancelled the quote.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                cancelled_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: Date Quote was cancelled.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                last_sent_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: Date Quote was last sent.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                last_sent_by:
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                last_share_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: Date Quote was last shared.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                last_share_by:
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                converted_by:
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                converted_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: Date Quote was converted.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                description:
                                  description: Quote observations.
                                  type:
                                    - string
                                    - 'null'
                                internal_quote_id:
                                  description: Internal ID of the Quote.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                  examples:
                                    - FS-123
                                external_quote_id:
                                  description: External ID of the Quote.
                                  type:
                                    - string
                                    - 'null'
                                  readOnly: true
                                  examples:
                                    - FS-123
                                related_to_type:
                                  description: Type of object related to the quote.
                                  type:
                                    - string
                                    - 'null'
                                  enum:
                                    - FAILURE
                                    - SCHEDULED_WORK
                                    - null
                                  examples:
                                    - FAILURE
                                related_to_id:
                                  description: ID of the object (failure or scheduled work) related to the quote.
                                  type:
                                    - integer
                                    - 'null'
                                base_total:
                                  description: Total Base value of the Quote, without VAT and discount.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                discount_total:
                                  description: Total value of the discount applied to the Quote items.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                vat_total:
                                  description: Total value of the VAT applied to the Quote items.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                total:
                                  description: Total value of the Quote, considering the discount and VAT applied.
                                  type: integer
                                  readOnly: true
                                sell_order_id:
                                  description: ID of the Sale associated to the Quote, after converted.
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                updated_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: Date Quote was updated.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                deleted_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: Date Quote was deleted.
                                      type:
                                        - string
                                        - 'null'
                                      readOnly: true
                                quote_request_id:
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                received_quote_request_id:
                                  type:
                                    - integer
                                    - 'null'
                                  readOnly: true
                                is_from_network:
                                  type: boolean
                                  readOnly: true
                                client_answer:
                                  type: object
                                  properties:
                                    clientUserName:
                                      type: string
                                    clientName:
                                      type: string
                                    answer:
                                      type: string
                            meta:
                              type: object
                              properties:
                                custom_fields:
                                  type:
                                    - object
                                    - 'null'
                                  additionalProperties:
                                    oneOf:
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - SELECT
                                            examples:
                                              - SELECT
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                option_id:
                                                  description: The ID of the selected option
                                                  type: integer
                                                  examples:
                                                    - 123
                                                option_code:
                                                  description: The code of the selected option
                                                  type:
                                                    - string
                                                    - 'null'
                                                  examples:
                                                    - OP01
                                                value:
                                                  description: The value of the selected option
                                                  type: string
                                                  examples:
                                                    - My Option 1
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field supports selecting multiple values
                                                    type: boolean
                                                    examples:
                                                      - true
                                                  managed_by_integrations:
                                                    description: >-
                                                      Indicates if the Custom Field options are only managed by
                                                      integrations
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - TEXT
                                            examples:
                                              - TEXT
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            examples:
                                              - abc
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (Empty for Custom Fields of
                                                  type TEXT)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - BOOLEAN
                                            examples:
                                              - BOOLEAN
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - boolean
                                              - 'null'
                                            examples:
                                              - true
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (There are none for the Custom
                                                  Field Boolean type)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - RELATIONSHIP
                                            examples:
                                              - RELATIONSHIP
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                related_to_type:
                                                  description: The type of object that is selected as the Custom Field Values
                                                  type: string
                                                  enum:
                                                    - CLIENT
                                                    - CONTACT
                                                  examples:
                                                    - CLIENT
                                                related_to_id:
                                                  description: The ID of object that is selected as the Custom Field Value
                                                  type: integer
                                                  examples:
                                                    - 123
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field allows multiple selection
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  relationship_object:
                                                    description: The type of object that is selected as the Custom Field Values
                                                    type: string
                                                    enum:
                                                      - CLIENT
                                                      - CONTACT
                                                    examples:
                                                      - CLIENT
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - DATETIME
                                            examples:
                                              - DATETIME
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-12-12 12:39:00'
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_past_dates:
                                                    description: Indicates if this Custom Field support past dates
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  allow_future_dates:
                                                    description: Indicates if this Custom Field support future dates
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - NUMBER
                                            examples:
                                              - NUMBER
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - integer
                                              - 'null'
                                            examples:
                                              - 12
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  min:
                                                    description: Indicates the minimum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 1
                                                  max:
                                                    description: Indicates the maximum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 3
                                    discriminator:
                                      propertyName: field_type
                        - title: Scheduled Work
                          description: Scheduled Order model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Scheduled Order
                              type: string
                              readOnly: true
                              examples:
                                - '123'
                            type:
                              description: Model type
                              type: string
                              enum:
                                - scheduled_work
                              readOnly: true
                              examples:
                                - scheduled_work
                            attributes:
                              type: object
                              properties:
                                entity_id:
                                  description: The ID of the Entity where the Scheduled Work belongs.
                                  type: integer
                                  examples:
                                    - 123
                                complete_date:
                                  description: The datetime when the Scheduled Work was completed
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  examples:
                                    - '2014-09-01 02:22:00'
                                cost_center_name:
                                  description: The name of the Cost Center associated with the Scheduled Work.
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - abc
                                completed_by_id:
                                  description: The ID of the Operator that completed the Scheduled Work.
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 123
                                completed_percentage:
                                  description: The percentage of the Scheduled Work that is completed.
                                  type: integer
                                  examples:
                                    - 45
                                completed_date:
                                  description: The datetime when the Scheduled Work was completed
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  examples:
                                    - '2014-09-01 02:22:00'
                                confirmed:
                                  description: Indicates if the Scheduled Work is confirmed.
                                  type: boolean
                                  examples:
                                    - true
                                failure_id:
                                  description: >-
                                    The ID of the Failure / Work Order associated with the Scheduled Work (Only if the
                                    Scheduled work originated from a Failure / Work Order)
                                  type:
                                    - integer
                                    - 'null'
                                last_status_change_date:
                                  description: The datetime when the Scheduled Work status changed for the last time
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  examples:
                                    - '2014-09-01 02:22:00'
                                last_status_change_operator:
                                  description: The name of the Operator that changed the Scheduled Work status for the last time
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - John
                                manpower_duration:
                                  description: The total manpower duration of the Scheduled work in ISO-8601 duration format.
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - P0Y0M0DT0H1M19S
                                manpower_cost:
                                  description: The total manpower cost of the Scheduled work in the currency of the logged in user.
                                  type:
                                    - number
                                    - 'null'
                                  examples:
                                    - 12.5
                                observation:
                                  description: Observations added to the Scheduled Work.
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - abc
                                real_start_date:
                                  description: >-
                                    The datetime when the Scheduled Work was actually started (not to confuse with the
                                    datetime when the Scheduled work planned to start)
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  examples:
                                    - '2014-09-01 02:22:00'
                                running:
                                  description: Indicates if the Scheduled Work is currently in a running status
                                  type: boolean
                                  examples:
                                    - true
                                schedule_work_id:
                                  description: The ID of the Scheduled Work
                                  type: integer
                                  examples:
                                    - 123
                                signature_status:
                                  description: Indicates if the Scheduled Work is signed by a responsible.
                                  type: string
                                  enum:
                                    - NOT_SIGNED
                                    - SIGNED
                                  examples:
                                    - NOT_SIGNED
                                start_date:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: The datetime when the Scheduled Work is/was planned to start
                                started_by_id:
                                  description: The ID of the Operator that started the Scheduled Work.
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 123
                                state:
                                  description: The current state of the Scheduled Work.
                                  type: string
                                  enum:
                                    - SCHEDULED
                                    - RUNNING
                                    - PAUSED
                                    - COMPLETED
                                    - CANCELED
                                    - ARCHIVED
                                    - COMPLETED_CANCELED
                                  examples:
                                    - COMPLETED
                                time_running:
                                  description: The current running duration of the Scheduled work in ISO-8601 duration format.
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - P0Y0M0DT0H1M19S
                                visit:
                                  description: >-
                                    Indicates the position/step of the Scheduled work in the parent Work / Planned Job
                                    that is originates from (e.g. can be the first Scheduled Work of the Work / Planned
                                    Job, the second, and so on)
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 1
                                work_id:
                                  description: The ID of the parent Work / Planned Job
                                  type: integer
                                  examples:
                                    - 123
                                next_sla_date:
                                  description: >
                                    The datetime of the closest SLA that is still ongoing in the Scheduled Work

                                    (This field includes only SLAs that have not finished yet and are still ongoing, and
                                    will be null if there's none)
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  examples:
                                    - '2014-09-01 02:22:00'
                                next_sla_percentage:
                                  description: >
                                    The percentage of the Scheduled Work tasks that are completed in the closest SLA
                                    that is still ongoing

                                    (This field includes only SLAs that have not finished yet and are still ongoing, and
                                    will be null if there's none)
                                  type:
                                    - number
                                    - 'null'
                                  examples:
                                    - 75.5
                                next_scheduled_work_sla_id:
                                  description: >
                                    The ID of the next SLA

                                    (This field includes the next SLA, despite his current status being already finished
                                    or paused)
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 123
                                next_scheduled_work_sla_date:
                                  description: >
                                    The datetime of the next SLA

                                    (This field includes the next SLA, despite his current status being already finished
                                    or paused)
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  examples:
                                    - '2014-09-01 02:22:00'
                                next_scheduled_work_sla_status_order:
                                  description: >
                                    The status order of the next SLA

                                    (0 if status is 'RUNNING', 1 if status is 'PAUSED', 2 if status is 'FINISHED',
                                    otherwise 3)

                                    (This field includes the next SLA, despite his current status being already finished
                                    or paused)
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 0
                                rescheduled_by_user:
                                  description: Indicates if the Scheduled Work was manually rescheduled by an User
                                  type: boolean
                                  examples:
                                    - false
                                network_id:
                                  description: ID used to reference a shared Planned Job Order
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 123
                                updated_at:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: The datetime of the last update in the Scheduled Work
                                display_start_date:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: The start datetime to display in the Scheduled Work
                                      type:
                                        - string
                                        - 'null'
                                display_complete_date:
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                    - description: The complete datetime to display in the Scheduled Work
                                      type:
                                        - string
                                        - 'null'
                                estimated_duration_absolute_deviation:
                                  description: >-
                                    The absolute deviation between the actual manpower duration and the estimated task
                                    time in the Scheduled Work, representing the total difference regardless of whether
                                    the estimate was over or under
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 150
                                estimated_duration_relative_deviation:
                                  description: >-
                                    The relative deviation between the actual manpower duration and the estimated task
                                    time in the Scheduled Work. A negative value indicates the estimate was too low,
                                    while a positive value indicates it was too high
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - -150
                                pause_reason_id:
                                  description: The ID of the Pause Reason associated with the Scheduled Work
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 123
                                last_status_description:
                                  description: A description provided when the last status change occurred on the Scheduled Work
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - Waiting for spare parts delivery
                            relationships:
                              description: The relationships of the Scheduled Work (Only present when expanded in the request)
                              type: object
                              properties:
                                auditStats:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - audit_stats
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                buyOrders:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - buy_order
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                client:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - client
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                completedBy:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                elementRegistries:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - element_registry
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                entity:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - entity
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                events:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - event
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                eventsPlanned:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - event
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                files:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - file
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                gatekeeperAnswerRegistries:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - gatekeeper_answer_registry
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                networkStatus:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            description: >-
                                              If RECEIVER the Scheduled Work was received on Network, if SENDER the
                                              Scheduled Work was sent to the Network.
                                            type: string
                                            enum:
                                              - SENDER
                                              - RECEIVER
                                            readOnly: true
                                          action:
                                            description: >-
                                              If UNSHARED, the Scheduled Work was unshared from Network, if null, no
                                              action was taken.
                                            type: string
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                          in_sync:
                                            description: If the Scheduled Work is in sync of execution with the Network.
                                            type: boolean
                                            readOnly: true
                                          network_entity_uuid:
                                            description: >-
                                              The UUID of the Network Entity related to the Scheduled Work network
                                              status.
                                            type: string
                                            readOnly: true
                                          network_relation_id:
                                            description: >-
                                              The ID of the Network Relation related to the Scheduled Work network
                                              status. It can be from a Client or a Supplier.
                                            type: integer
                                            readOnly: true
                                          network_relation_type:
                                            description: >-
                                              The type of Network Relation related to the Scheduled Work network status.
                                              It can be from a Client or a Supplier, used to identify the relation ID
                                              and the relation the Network Entity has to the Scheduled Work.
                                            type: string
                                            enum:
                                              - CLIENT
                                              - SUPPLIER
                                            readOnly: true
                                          shared:
                                            description: If the Scheduled Work is actively shared on Network.
                                            type: boolean
                                            readOnly: true
                                otherCosts:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - other-cost
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                participants:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - operator
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                pausedBy:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                reminderRules:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - reminder_rules
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                reminders:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - reminder
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                requests:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - request
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                scheduledWorkSlas:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - schedule_work_sla
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                startedBy:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                stock:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - stock
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                stockTasks:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - stock
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                survey:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - survey
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                surveyFeedbacks:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - survey_feedback
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                work:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - work
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                realStartDateEditedBy:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                completeDateEditedBy:
                                  type: object
                                  properties:
                                    data:
                                      type: object
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - operator
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                failureScheduleMapping:
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - failure_schedule_mapping
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                                pause_reason:
                                  description: The Pause Reason associated with the Scheduled Work
                                  type: object
                                  properties:
                                    data:
                                      type:
                                        - object
                                        - 'null'
                                      properties:
                                        type:
                                          type: string
                                          enum:
                                            - pause_reason
                                          readOnly: true
                                        id:
                                          type: string
                                          readOnly: true
                                assignees:
                                  description: The Operators and Teams assigned to the Scheduled Work
                                  type: object
                                  properties:
                                    data:
                                      type: array
                                      items:
                                        type: object
                                        properties:
                                          type:
                                            type: string
                                            enum:
                                              - scheduled_work_assignee
                                            readOnly: true
                                          id:
                                            type: string
                                            readOnly: true
                          required:
                            - id
                            - type
                            - attributes
                    uniqueItems: true
                  meta:
                    title: Meta
                    description: Meta model structure details
                    type: object
                    properties:
                      cost_centers:
                        type: object
                        properties:
                          names:
                            type: array
                            items:
                              type: string
                            examples:
                              - - Cost center
                                - Cost center 2
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /sales/sell-orders/{sellOrderId}/lines:
    get:
      operationId: getSellOrderLines
      tags:
        - Sell Orders
      summary: List all Sell Order (Sale) Lines
      description: This endpoint allows you to list all Sell Orders (Sales) Lines for a specific Sell Order.
      parameters:
        - name: sellOrderId
          in: path
          description: The Sell Order (Sale) ID
          required: true
          schema:
            type: string
        - name: expanded
          in: query
          description: Available expands for the Sell Order Line
          schema:
            type: string
            enum:
              - cost_center
              - material
              - other_cost
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      title: Sell Order (Sale) Line Item
                      description: Sell Order (Sale) Line Item Resource structure details
                      type: object
                      properties:
                        id:
                          description: ID of the Sell Order (Sale) Line Item
                          type: string
                          examples:
                            - '123'
                          readOnly: true
                        type:
                          description: Resource type
                          type: string
                          enum:
                            - sell_order_line
                          examples:
                            - sell_order_line
                          readOnly: true
                        attributes:
                          type: object
                          properties:
                            cost_center_id:
                              description: ID of the associated Cost Center.
                              type: integer
                              examples:
                                - 123
                            description:
                              description: |
                                Description of the Sell Order (Sale) Line Item.

                                This field is required if `type` is `SERVICE`.
                              type:
                                - string
                                - 'null'
                              examples:
                                - Short description regarding the Sell Order (Sale) Line Item
                            type:
                              description: |
                                Type of the item on the Sell Order (Sale) Line Item.

                                Available types are:
                                - `MATERIAL`
                                - `SERVICE`
                                - `OTHER_COST`
                              type: string
                              enum:
                                - MATERIAL
                                - SERVICE
                                - OTHER_COST
                              examples:
                                - SERVICE
                            base_total:
                              description: |
                                Total Base Price amount for the Sell Order (Sale) Line Item.

                                **This amount does not include Discount or Taxes.**

                                This amount is calculated by: `quantity * unit_price`
                              type: number
                              examples:
                                - 100.23
                            discount:
                              description: |
                                Discount percentage applied to the item in the Sell Order (Sale) Line.

                                **`10.23` in this field means 10.23% Discount**
                              type: number
                              minimum: 0
                              maximum: 100
                              examples:
                                - 10.23
                            discount_total:
                              description: |
                                Total Discount amount for the Sell Order (Sale) Line Item.

                                This amount is calculated by: `base_total * (discount / 100)`
                              type: number
                              examples:
                                - 10.23
                            material_id:
                              description: |
                                ID of the Material in the Sell Order (Sale) Line Item.

                                This field is required if `type` is `MATERIAL`.
                              type:
                                - integer
                                - 'null'
                              examples:
                                - 123
                            observations:
                              description: |
                                Observations or notes regardint the Sell Order (Sale) Line Item.
                              type:
                                - string
                                - 'null'
                              maxLength: 255
                              examples:
                                - Some observation that gives more context about the Line Item.
                            other_cost_id:
                              description: |
                                ID of the Other Cost in the Sell Order (Sale) Line Item.

                                This field is required if `type` is `OTHER_COST`.
                              type:
                                - integer
                                - 'null'
                              examples:
                                - 123
                            quantity:
                              description: |
                                Quantity of items in the Sell Order (Sale) Line.

                                **This field is a Numeric String.**
                              type: string
                              examples:
                                - '10.00'
                            total:
                              description: |
                                Total Price amount for the Sell Order (Sale) Line Item.

                                **This amount includes Discount but __DOES NOT include Taxes__.**

                                This amount is calculated by: `base_total - discount_total`
                              type: number
                              examples:
                                - 90
                            unit:
                              description: |
                                Unit of the item in the Sell Order (Sale) Line.
                              type:
                                - string
                                - 'null'
                              examples:
                                - kg
                            unit_price:
                              description: Price of each unit of the item in the Sell Order (Sale) Line.
                              type: number
                              examples:
                                - 12.34
                            vat:
                              description: |
                                Tax percentage applied to the item in the Sell Order (Sale) Line.

                                **`10.23` in this field means 10.23% Tax**
                              type: number
                              minimum: 0
                              maximum: 100
                              examples:
                                - 10.23
                            vat_total:
                              description: |
                                Total Price amount including Taxes for the Sell Order (Sale) Line Item.

                                **This amount includes Discount and Taxes.**

                                This amount is calculated by: `total * (vat / 100)`
                              type: number
                              examples:
                                - 97.34
                  included:
                    description: >
                      List of expanded relationships for the Sell Order (Sale) Line.


                      Items available in this list will vary depending on the value supplied in `expanded` query
                      parameter.
                    type: array
                    items:
                      anyOf:
                        - title: Cost Center
                          description: >
                            Cost Center resource structure details.


                            Cost Centers in Infraspeak can be associated to Lines in Sales and Buy Orders, Failures
                            (Work Orders) or Scheduled Works (Planned Job Orders).
                          type: object
                          properties:
                            id:
                              description: Cost Center ID
                              type: string
                              readOnly: true
                            type:
                              description: Resource type
                              type: string
                              enum:
                                - cost_center
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                name:
                                  description: Name for the Cost Center.
                                  type: string
                                  examples:
                                    - AVAC Corretiva
                                code:
                                  description: Code for the Cost Center
                                  type: string
                                  examples:
                                    - C.AVAC
                                responsible_name:
                                  description: Name for the person responsible for the Cost Center
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - Luis
                                responsible_email:
                                  description: Email for the person responsible for the Cost Center
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - luis@example.com
                                responsible_phone:
                                  description: Phone Number for the person responsible for the Cost Center
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - '+351912345678'
                                responsible_cellphone:
                                  description: Cellphone Number for the person responsible for the Cost Center
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - '+351912345678'
                                observation:
                                  description: User defined Observations for the Cost Center
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - An observation regarding my cost center.
                        - title: Material
                          description: Material model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Material
                              type: string
                              readOnly: true
                              examples:
                                - '1'
                            type:
                              description: Model type
                              type: string
                              enum:
                                - stock-material
                              readOnly: true
                              examples:
                                - stock-material
                            attributes:
                              type: object
                              properties:
                                material_id:
                                  description: ID of the material
                                  type: string
                                  readOnly: true
                                  examples:
                                    - '1'
                                material_type_id:
                                  description: ID of the material type
                                  type: string
                                  readOnly: true
                                  examples:
                                    - '11'
                                name:
                                  description: Name of the material
                                  type: string
                                  examples:
                                    - Chair
                                code:
                                  description: Code of the material
                                  type: string
                                  examples:
                                    - CH-00001
                                purchase_consumption_type:
                                  description: Purchase consumption type of the material
                                  type: string
                                  enum:
                                    - INHERIT
                                    - AUTOMATIC
                                    - MANUAL
                                  examples:
                                    - INHERIT
                                units:
                                  description: Indicates which kind of unit should this material be measured with
                                  type: string
                                  examples:
                                    - un
                                observations:
                                  description: Material observations
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - This is a observation
                                description:
                                  description: Description of the material
                                  type: string
                                  examples:
                                    - This is a chair
                                sku:
                                  description: SKU of the material
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - SKU-00001
                                ean_upc:
                                  description: EAN/UPC of the material
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - '1234567890123'
                                sale_price:
                                  description: Sale price of the material
                                  type: number
                                  examples:
                                    - 10
                                sale_vat:
                                  description: Sale VAT of the material
                                  type: number
                                  examples:
                                    - 23
                                created_at:
                                  description: Date of creation
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                  readOnly: true
                                updated_at:
                                  description: Last update date
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                  readOnly: true
                                warehouses_minimum_stocks:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      warehouse_id:
                                        type: integer
                                        examples:
                                          - 1
                                      warehouse_name:
                                        type: string
                                        examples:
                                          - Warehouse
                                      minimum_quantity:
                                        type: integer
                                        examples:
                                          - 10
                          required:
                            - id
                            - type
                            - attributes
                        - title: Other Cost
                          description: Other Cost model structure details
                          type: object
                          properties:
                            id:
                              description: The ID of the Other Cost
                              type: string
                              examples:
                                - '123'
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - other-cost
                              examples:
                                - other-cost
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                other_cost_id:
                                  description: The ID of the Other Cost
                                  type: integer
                                  examples:
                                    - 123
                                  readOnly: true
                                entity_id:
                                  description: The ID of the Entity
                                  type: integer
                                  examples:
                                    - 123
                                  readOnly: true
                                input_type:
                                  description: >-
                                    The type of Other Cost. Different types of Other Costs have different associated
                                    fields. Other Costs of type resource will measure its total cost based on how long
                                    (e.g. hours, minutes) the resource is occupied. Other Costs of type distance will
                                    measure its total cost based on how many units (e.g. meters, kilometers) are needed.
                                    Other Costs of type interval and time_range will measure its total cost based on
                                    duration. Other Costs of type currency will have a fixed cost manually defined for
                                    each operation. Other Costs of type custom_unit_of_measurement will measure its
                                    total cost based on how many units (e.g. m3, liters) are needed.
                                  type: string
                                  enum:
                                    - currency
                                    - distance
                                    - interval
                                    - time_range
                                    - resource
                                    - custom_unit_of_measurement
                                  examples:
                                    - currency
                                name:
                                  description: The name (or description) of the Other Cost
                                  type: string
                                  examples:
                                    - Contractual Labor
                                failure:
                                  description: >-
                                    Indicates if the Other Cost can be included in costs for Corrective Maintenance
                                    (Work Orders)
                                  type: boolean
                                  examples:
                                    - true
                                schedule_work:
                                  description: >-
                                    Indicates if the Other Cost can be included in costs for Preventive Maintenance
                                    (Planned Job Orders)
                                  type:
                                    - boolean
                                    - 'null'
                                  examples:
                                    - true
                                operator:
                                  description: >-
                                    Indicates if the Other Cost can be included in individual costs for operators
                                    (technicians)
                                  type:
                                    - boolean
                                    - 'null'
                                  examples:
                                    - true
                                icon:
                                  description: The icon to be presented for the Other Cost in Infraspeak platform.
                                  type: string
                                  enum:
                                    - truck
                                    - car
                                    - clock-o
                                    - bed
                                    - user
                                    - usd
                                    - cutlery
                                    - wrench
                                  examples:
                                    - truck
                                element:
                                  description: Indicates if the Other Cost can be included in costs for Assets
                                  type:
                                    - boolean
                                    - 'null'
                                  examples:
                                    - true
                                cost_per_unit:
                                  description: >-
                                    Cost per unit of the Other Cost. Specific for input_type "resource", "distance" or
                                    "custom_unit_of_measurement"
                                  type:
                                    - number
                                    - 'null'
                                  examples:
                                    - 2.5
                                default_sell_price:
                                  description: >-
                                    Default sell price of the Other Cost. Specific for input_type "resource", "distance"
                                    or "custom_unit_of_measurement"
                                  type:
                                    - number
                                    - 'null'
                                  examples:
                                    - 4
                                default_sell_vat:
                                  description: >-
                                    Default sale VAT/IVA percentage of the Other Cost. Specific for input_type
                                    "resource", "distance" or "custom_unit_of_measurement"
                                  type:
                                    - number
                                    - 'null'
                                  examples:
                                    - 23
                                unit:
                                  description: >-
                                    Unit of the Other Cost. Specific for input_type "resource", "distance" or
                                    "custom_unit_of_measurement"
                                  type:
                                    - string
                                    - 'null'
                            relationships:
                              description: The relationships of the Other Cost (Only present when expanded in the request)
                              type: object
                              properties:
                                customClientPrices:
                                  description: The Custom Client Prices associated with the Other Cost
                                  type: object
                                entity:
                                  description: The Entity where the Other Cost belongs
                                  type: object
                          required:
                            - id
                            - type
                            - attributes
                    uniqueItems: true
                  meta:
                    title: Meta
                    description: Meta model structure details
                    type: object
                    properties:
                      pagination:
                        type: object
                        properties:
                          total:
                            description: Total items.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          count:
                            description: Total items returned for the current page.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          per_page:
                            description: Maximum number of records per page.
                            type: integer
                            minimum: 1
                            default: 200
                            examples:
                              - 1
                          current_page:
                            description: Number of the current page.
                            type: integer
                            minimum: 1
                            default: 1
                          total_pages:
                            description: Number of the total pages.
                            type: integer
                            minimum: 1
                            default: 1
                        required:
                          - total
                          - count
                          - per_page
                          - current_page
                          - total_pages
                  links:
                    title: Response Links on listing operations
                    description: >-
                      Requests that return multiple items include a `links` attribute, with links related to request's
                      context.
                    type: object
                    properties:
                      self:
                        description: Current response link.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      first:
                        description: Link to the first page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      last:
                        description: Link to the previous page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      next:
                        description: Link to the next page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                    required:
                      - self
                      - first
                      - last
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
    post:
      operationId: createSellOrderLine
      tags:
        - Sell Orders
      summary: Create a Sell Order (Sale) Line
      description: This endpoint allows you to create a Sell Order (Sale) Line for a specific Sell Order.
      parameters:
        - name: sellOrderId
          in: path
          description: The Sell Order (Sale) ID
          required: true
          schema:
            type: string
        - name: expanded
          in: query
          description: Available expands for the Sell Order Line
          schema:
            type: string
            enum:
              - cost_center
              - material
              - other_cost
      requestBody:
        content:
          application/json:
            schema:
              description: Sell Order (Sale) Line Create Payload
              type: object
              properties:
                description:
                  description: |
                    Description of the Sell Order (Sale) Line Item.

                    This field is required if `type` is `SERVICE`.
                  type:
                    - string
                    - 'null'
                  examples:
                    - Short description regarding the Sell Order (Sale) Line Item
                type:
                  description: |
                    Type of the item on the Sell Order (Sale) Line Item.

                    Available types are:
                    - `MATERIAL`
                    - `SERVICE`
                    - `OTHER_COST`
                  type: string
                  enum:
                    - MATERIAL
                    - SERVICE
                    - OTHER_COST
                  examples:
                    - SERVICE
                discount:
                  description: |
                    Discount percentage applied to the item in the Sell Order (Sale) Line.

                    **`10.23` in this field means 10.23% Discount**
                  type: number
                  minimum: 0
                  maximum: 100
                  examples:
                    - 10.23
                material_id:
                  description: |
                    ID of the Material in the Sell Order (Sale) Line Item.

                    This field is required if `type` is `MATERIAL`.
                  type:
                    - integer
                    - 'null'
                  examples:
                    - 123
                observations:
                  description: |
                    Observations or notes regardint the Sell Order (Sale) Line Item.
                  type:
                    - string
                    - 'null'
                  maxLength: 255
                  examples:
                    - Some observation that gives more context about the Line Item.
                other_cost_id:
                  description: |
                    ID of the Other Cost in the Sell Order (Sale) Line Item.

                    This field is required if `type` is `OTHER_COST`.
                  type:
                    - integer
                    - 'null'
                  examples:
                    - 123
                quantity:
                  description: |
                    Quantity of items in the Sell Order (Sale) Line.

                    **This field is a Numeric String.**
                  type: string
                  examples:
                    - '10.00'
                unit:
                  description: |
                    Unit of the item in the Sell Order (Sale) Line.
                  type:
                    - string
                    - 'null'
                  examples:
                    - kg
                unit_price:
                  description: Price of each unit of the item in the Sell Order (Sale) Line.
                  type: number
                  examples:
                    - 12.34
                vat:
                  description: |
                    Tax percentage applied to the item in the Sell Order (Sale) Line.

                    **`10.23` in this field means 10.23% Tax**
                  type: number
                  minimum: 0
                  maximum: 100
                  examples:
                    - 10.23
              required:
                - type
                - quantity
                - unit_price
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: Sell Order (Sale) Line Item
                    description: Sell Order (Sale) Line Item Resource structure details
                    type: object
                    properties:
                      id:
                        description: ID of the Sell Order (Sale) Line Item
                        type: string
                        examples:
                          - '123'
                        readOnly: true
                      type:
                        description: Resource type
                        type: string
                        enum:
                          - sell_order_line
                        examples:
                          - sell_order_line
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          cost_center_id:
                            description: ID of the associated Cost Center.
                            type: integer
                            examples:
                              - 123
                          description:
                            description: |
                              Description of the Sell Order (Sale) Line Item.

                              This field is required if `type` is `SERVICE`.
                            type:
                              - string
                              - 'null'
                            examples:
                              - Short description regarding the Sell Order (Sale) Line Item
                          type:
                            description: |
                              Type of the item on the Sell Order (Sale) Line Item.

                              Available types are:
                              - `MATERIAL`
                              - `SERVICE`
                              - `OTHER_COST`
                            type: string
                            enum:
                              - MATERIAL
                              - SERVICE
                              - OTHER_COST
                            examples:
                              - SERVICE
                          base_total:
                            description: |
                              Total Base Price amount for the Sell Order (Sale) Line Item.

                              **This amount does not include Discount or Taxes.**

                              This amount is calculated by: `quantity * unit_price`
                            type: number
                            examples:
                              - 100.23
                          discount:
                            description: |
                              Discount percentage applied to the item in the Sell Order (Sale) Line.

                              **`10.23` in this field means 10.23% Discount**
                            type: number
                            minimum: 0
                            maximum: 100
                            examples:
                              - 10.23
                          discount_total:
                            description: |
                              Total Discount amount for the Sell Order (Sale) Line Item.

                              This amount is calculated by: `base_total * (discount / 100)`
                            type: number
                            examples:
                              - 10.23
                          material_id:
                            description: |
                              ID of the Material in the Sell Order (Sale) Line Item.

                              This field is required if `type` is `MATERIAL`.
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 123
                          observations:
                            description: |
                              Observations or notes regardint the Sell Order (Sale) Line Item.
                            type:
                              - string
                              - 'null'
                            maxLength: 255
                            examples:
                              - Some observation that gives more context about the Line Item.
                          other_cost_id:
                            description: |
                              ID of the Other Cost in the Sell Order (Sale) Line Item.

                              This field is required if `type` is `OTHER_COST`.
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 123
                          quantity:
                            description: |
                              Quantity of items in the Sell Order (Sale) Line.

                              **This field is a Numeric String.**
                            type: string
                            examples:
                              - '10.00'
                          total:
                            description: |
                              Total Price amount for the Sell Order (Sale) Line Item.

                              **This amount includes Discount but __DOES NOT include Taxes__.**

                              This amount is calculated by: `base_total - discount_total`
                            type: number
                            examples:
                              - 90
                          unit:
                            description: |
                              Unit of the item in the Sell Order (Sale) Line.
                            type:
                              - string
                              - 'null'
                            examples:
                              - kg
                          unit_price:
                            description: Price of each unit of the item in the Sell Order (Sale) Line.
                            type: number
                            examples:
                              - 12.34
                          vat:
                            description: |
                              Tax percentage applied to the item in the Sell Order (Sale) Line.

                              **`10.23` in this field means 10.23% Tax**
                            type: number
                            minimum: 0
                            maximum: 100
                            examples:
                              - 10.23
                          vat_total:
                            description: |
                              Total Price amount including Taxes for the Sell Order (Sale) Line Item.

                              **This amount includes Discount and Taxes.**

                              This amount is calculated by: `total * (vat / 100)`
                            type: number
                            examples:
                              - 97.34
                  included:
                    description: >
                      List of expanded relationships for the Sell Order (Sale) Line.


                      Items available in this list will vary depending on the value supplied in `expanded` query
                      parameter.
                    type: array
                    items:
                      anyOf:
                        - title: Cost Center
                          description: >
                            Cost Center resource structure details.


                            Cost Centers in Infraspeak can be associated to Lines in Sales and Buy Orders, Failures
                            (Work Orders) or Scheduled Works (Planned Job Orders).
                          type: object
                          properties:
                            id:
                              description: Cost Center ID
                              type: string
                              readOnly: true
                            type:
                              description: Resource type
                              type: string
                              enum:
                                - cost_center
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                name:
                                  description: Name for the Cost Center.
                                  type: string
                                  examples:
                                    - AVAC Corretiva
                                code:
                                  description: Code for the Cost Center
                                  type: string
                                  examples:
                                    - C.AVAC
                                responsible_name:
                                  description: Name for the person responsible for the Cost Center
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - Luis
                                responsible_email:
                                  description: Email for the person responsible for the Cost Center
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - luis@example.com
                                responsible_phone:
                                  description: Phone Number for the person responsible for the Cost Center
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - '+351912345678'
                                responsible_cellphone:
                                  description: Cellphone Number for the person responsible for the Cost Center
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - '+351912345678'
                                observation:
                                  description: User defined Observations for the Cost Center
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - An observation regarding my cost center.
                        - title: Material
                          description: Material model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Material
                              type: string
                              readOnly: true
                              examples:
                                - '1'
                            type:
                              description: Model type
                              type: string
                              enum:
                                - stock-material
                              readOnly: true
                              examples:
                                - stock-material
                            attributes:
                              type: object
                              properties:
                                material_id:
                                  description: ID of the material
                                  type: string
                                  readOnly: true
                                  examples:
                                    - '1'
                                material_type_id:
                                  description: ID of the material type
                                  type: string
                                  readOnly: true
                                  examples:
                                    - '11'
                                name:
                                  description: Name of the material
                                  type: string
                                  examples:
                                    - Chair
                                code:
                                  description: Code of the material
                                  type: string
                                  examples:
                                    - CH-00001
                                purchase_consumption_type:
                                  description: Purchase consumption type of the material
                                  type: string
                                  enum:
                                    - INHERIT
                                    - AUTOMATIC
                                    - MANUAL
                                  examples:
                                    - INHERIT
                                units:
                                  description: Indicates which kind of unit should this material be measured with
                                  type: string
                                  examples:
                                    - un
                                observations:
                                  description: Material observations
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - This is a observation
                                description:
                                  description: Description of the material
                                  type: string
                                  examples:
                                    - This is a chair
                                sku:
                                  description: SKU of the material
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - SKU-00001
                                ean_upc:
                                  description: EAN/UPC of the material
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - '1234567890123'
                                sale_price:
                                  description: Sale price of the material
                                  type: number
                                  examples:
                                    - 10
                                sale_vat:
                                  description: Sale VAT of the material
                                  type: number
                                  examples:
                                    - 23
                                created_at:
                                  description: Date of creation
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                  readOnly: true
                                updated_at:
                                  description: Last update date
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                  readOnly: true
                                warehouses_minimum_stocks:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      warehouse_id:
                                        type: integer
                                        examples:
                                          - 1
                                      warehouse_name:
                                        type: string
                                        examples:
                                          - Warehouse
                                      minimum_quantity:
                                        type: integer
                                        examples:
                                          - 10
                          required:
                            - id
                            - type
                            - attributes
                        - title: Other Cost
                          description: Other Cost model structure details
                          type: object
                          properties:
                            id:
                              description: The ID of the Other Cost
                              type: string
                              examples:
                                - '123'
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - other-cost
                              examples:
                                - other-cost
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                other_cost_id:
                                  description: The ID of the Other Cost
                                  type: integer
                                  examples:
                                    - 123
                                  readOnly: true
                                entity_id:
                                  description: The ID of the Entity
                                  type: integer
                                  examples:
                                    - 123
                                  readOnly: true
                                input_type:
                                  description: >-
                                    The type of Other Cost. Different types of Other Costs have different associated
                                    fields. Other Costs of type resource will measure its total cost based on how long
                                    (e.g. hours, minutes) the resource is occupied. Other Costs of type distance will
                                    measure its total cost based on how many units (e.g. meters, kilometers) are needed.
                                    Other Costs of type interval and time_range will measure its total cost based on
                                    duration. Other Costs of type currency will have a fixed cost manually defined for
                                    each operation. Other Costs of type custom_unit_of_measurement will measure its
                                    total cost based on how many units (e.g. m3, liters) are needed.
                                  type: string
                                  enum:
                                    - currency
                                    - distance
                                    - interval
                                    - time_range
                                    - resource
                                    - custom_unit_of_measurement
                                  examples:
                                    - currency
                                name:
                                  description: The name (or description) of the Other Cost
                                  type: string
                                  examples:
                                    - Contractual Labor
                                failure:
                                  description: >-
                                    Indicates if the Other Cost can be included in costs for Corrective Maintenance
                                    (Work Orders)
                                  type: boolean
                                  examples:
                                    - true
                                schedule_work:
                                  description: >-
                                    Indicates if the Other Cost can be included in costs for Preventive Maintenance
                                    (Planned Job Orders)
                                  type:
                                    - boolean
                                    - 'null'
                                  examples:
                                    - true
                                operator:
                                  description: >-
                                    Indicates if the Other Cost can be included in individual costs for operators
                                    (technicians)
                                  type:
                                    - boolean
                                    - 'null'
                                  examples:
                                    - true
                                icon:
                                  description: The icon to be presented for the Other Cost in Infraspeak platform.
                                  type: string
                                  enum:
                                    - truck
                                    - car
                                    - clock-o
                                    - bed
                                    - user
                                    - usd
                                    - cutlery
                                    - wrench
                                  examples:
                                    - truck
                                element:
                                  description: Indicates if the Other Cost can be included in costs for Assets
                                  type:
                                    - boolean
                                    - 'null'
                                  examples:
                                    - true
                                cost_per_unit:
                                  description: >-
                                    Cost per unit of the Other Cost. Specific for input_type "resource", "distance" or
                                    "custom_unit_of_measurement"
                                  type:
                                    - number
                                    - 'null'
                                  examples:
                                    - 2.5
                                default_sell_price:
                                  description: >-
                                    Default sell price of the Other Cost. Specific for input_type "resource", "distance"
                                    or "custom_unit_of_measurement"
                                  type:
                                    - number
                                    - 'null'
                                  examples:
                                    - 4
                                default_sell_vat:
                                  description: >-
                                    Default sale VAT/IVA percentage of the Other Cost. Specific for input_type
                                    "resource", "distance" or "custom_unit_of_measurement"
                                  type:
                                    - number
                                    - 'null'
                                  examples:
                                    - 23
                                unit:
                                  description: >-
                                    Unit of the Other Cost. Specific for input_type "resource", "distance" or
                                    "custom_unit_of_measurement"
                                  type:
                                    - string
                                    - 'null'
                            relationships:
                              description: The relationships of the Other Cost (Only present when expanded in the request)
                              type: object
                              properties:
                                customClientPrices:
                                  description: The Custom Client Prices associated with the Other Cost
                                  type: object
                                entity:
                                  description: The Entity where the Other Cost belongs
                                  type: object
                          required:
                            - id
                            - type
                            - attributes
                    uniqueItems: true
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /sales/sell-orders/{sellOrderId}/lines/{sellOrderLineId}:
    patch:
      operationId: updateSellOrderLine
      tags:
        - Sell Orders
      summary: Update a Sell Order (Sale) Line
      description: This endpoint allows you to update a Sell Order (Sale) Line for a specific Sell Order (Sale).
      parameters:
        - name: sellOrderId
          in: path
          description: The Sell Order (Sale) ID
          required: true
          schema:
            type: string
        - name: sellOrderLineId
          in: path
          description: The Sell Order (Sale) Line ID
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              description: Sell Order (Sale) Line Update Payload
              type: object
              properties:
                description:
                  description: |
                    Description of the Sell Order (Sale) Line Item.

                    This field is required if `type` is `SERVICE`.
                  type:
                    - string
                    - 'null'
                  examples:
                    - Short description regarding the Sell Order (Sale) Line Item
                material_id:
                  description: |
                    ID of the Material in the Sell Order (Sale) Line Item.

                    This field is required if `type` is `MATERIAL`.
                  type:
                    - integer
                    - 'null'
                  examples:
                    - 123
                other_cost_id:
                  description: |
                    ID of the Other Cost in the Sell Order (Sale) Line Item.

                    This field is required if `type` is `OTHER_COST`.
                  type:
                    - integer
                    - 'null'
                  examples:
                    - 123
                quantity:
                  description: |
                    Quantity of items in the Sell Order (Sale) Line.

                    **This field is a Numeric String.**
                  type: string
                  examples:
                    - '10.00'
                unit:
                  description: |
                    Unit of the item in the Sell Order (Sale) Line.
                  type:
                    - string
                    - 'null'
                  examples:
                    - kg
                unit_price:
                  description: Price of each unit of the item in the Sell Order (Sale) Line.
                  type: number
                  examples:
                    - 12.34
                vat:
                  description: |
                    Tax percentage applied to the item in the Sell Order (Sale) Line.

                    **`10.23` in this field means 10.23% Tax**
                  type: number
                  minimum: 0
                  maximum: 100
                  examples:
                    - 10.23
                discount:
                  description: |
                    Discount percentage applied to the item in the Sell Order (Sale) Line.

                    **`10.23` in this field means 10.23% Discount**
                  type: number
                  minimum: 0
                  maximum: 100
                  examples:
                    - 10.23
                observations:
                  description: |
                    Observations or notes regardint the Sell Order (Sale) Line Item.
                  type:
                    - string
                    - 'null'
                  maxLength: 255
                  examples:
                    - Some observation that gives more context about the Line Item.
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: Sell Order (Sale) Line Item
                    description: Sell Order (Sale) Line Item Resource structure details
                    type: object
                    properties:
                      id:
                        description: ID of the Sell Order (Sale) Line Item
                        type: string
                        examples:
                          - '123'
                        readOnly: true
                      type:
                        description: Resource type
                        type: string
                        enum:
                          - sell_order_line
                        examples:
                          - sell_order_line
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          cost_center_id:
                            description: ID of the associated Cost Center.
                            type: integer
                            examples:
                              - 123
                          description:
                            description: |
                              Description of the Sell Order (Sale) Line Item.

                              This field is required if `type` is `SERVICE`.
                            type:
                              - string
                              - 'null'
                            examples:
                              - Short description regarding the Sell Order (Sale) Line Item
                          type:
                            description: |
                              Type of the item on the Sell Order (Sale) Line Item.

                              Available types are:
                              - `MATERIAL`
                              - `SERVICE`
                              - `OTHER_COST`
                            type: string
                            enum:
                              - MATERIAL
                              - SERVICE
                              - OTHER_COST
                            examples:
                              - SERVICE
                          base_total:
                            description: |
                              Total Base Price amount for the Sell Order (Sale) Line Item.

                              **This amount does not include Discount or Taxes.**

                              This amount is calculated by: `quantity * unit_price`
                            type: number
                            examples:
                              - 100.23
                          discount:
                            description: |
                              Discount percentage applied to the item in the Sell Order (Sale) Line.

                              **`10.23` in this field means 10.23% Discount**
                            type: number
                            minimum: 0
                            maximum: 100
                            examples:
                              - 10.23
                          discount_total:
                            description: |
                              Total Discount amount for the Sell Order (Sale) Line Item.

                              This amount is calculated by: `base_total * (discount / 100)`
                            type: number
                            examples:
                              - 10.23
                          material_id:
                            description: |
                              ID of the Material in the Sell Order (Sale) Line Item.

                              This field is required if `type` is `MATERIAL`.
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 123
                          observations:
                            description: |
                              Observations or notes regardint the Sell Order (Sale) Line Item.
                            type:
                              - string
                              - 'null'
                            maxLength: 255
                            examples:
                              - Some observation that gives more context about the Line Item.
                          other_cost_id:
                            description: |
                              ID of the Other Cost in the Sell Order (Sale) Line Item.

                              This field is required if `type` is `OTHER_COST`.
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 123
                          quantity:
                            description: |
                              Quantity of items in the Sell Order (Sale) Line.

                              **This field is a Numeric String.**
                            type: string
                            examples:
                              - '10.00'
                          total:
                            description: |
                              Total Price amount for the Sell Order (Sale) Line Item.

                              **This amount includes Discount but __DOES NOT include Taxes__.**

                              This amount is calculated by: `base_total - discount_total`
                            type: number
                            examples:
                              - 90
                          unit:
                            description: |
                              Unit of the item in the Sell Order (Sale) Line.
                            type:
                              - string
                              - 'null'
                            examples:
                              - kg
                          unit_price:
                            description: Price of each unit of the item in the Sell Order (Sale) Line.
                            type: number
                            examples:
                              - 12.34
                          vat:
                            description: |
                              Tax percentage applied to the item in the Sell Order (Sale) Line.

                              **`10.23` in this field means 10.23% Tax**
                            type: number
                            minimum: 0
                            maximum: 100
                            examples:
                              - 10.23
                          vat_total:
                            description: |
                              Total Price amount including Taxes for the Sell Order (Sale) Line Item.

                              **This amount includes Discount and Taxes.**

                              This amount is calculated by: `total * (vat / 100)`
                            type: number
                            examples:
                              - 97.34
                  included:
                    description: >
                      List of expanded relationships for the Sell Order (Sale) Line.


                      Items available in this list will vary depending on the value supplied in `expanded` query
                      parameter.
                    type: array
                    items:
                      anyOf:
                        - title: Cost Center
                          description: >
                            Cost Center resource structure details.


                            Cost Centers in Infraspeak can be associated to Lines in Sales and Buy Orders, Failures
                            (Work Orders) or Scheduled Works (Planned Job Orders).
                          type: object
                          properties:
                            id:
                              description: Cost Center ID
                              type: string
                              readOnly: true
                            type:
                              description: Resource type
                              type: string
                              enum:
                                - cost_center
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                name:
                                  description: Name for the Cost Center.
                                  type: string
                                  examples:
                                    - AVAC Corretiva
                                code:
                                  description: Code for the Cost Center
                                  type: string
                                  examples:
                                    - C.AVAC
                                responsible_name:
                                  description: Name for the person responsible for the Cost Center
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - Luis
                                responsible_email:
                                  description: Email for the person responsible for the Cost Center
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - luis@example.com
                                responsible_phone:
                                  description: Phone Number for the person responsible for the Cost Center
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - '+351912345678'
                                responsible_cellphone:
                                  description: Cellphone Number for the person responsible for the Cost Center
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - '+351912345678'
                                observation:
                                  description: User defined Observations for the Cost Center
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - An observation regarding my cost center.
                        - title: Material
                          description: Material model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Material
                              type: string
                              readOnly: true
                              examples:
                                - '1'
                            type:
                              description: Model type
                              type: string
                              enum:
                                - stock-material
                              readOnly: true
                              examples:
                                - stock-material
                            attributes:
                              type: object
                              properties:
                                material_id:
                                  description: ID of the material
                                  type: string
                                  readOnly: true
                                  examples:
                                    - '1'
                                material_type_id:
                                  description: ID of the material type
                                  type: string
                                  readOnly: true
                                  examples:
                                    - '11'
                                name:
                                  description: Name of the material
                                  type: string
                                  examples:
                                    - Chair
                                code:
                                  description: Code of the material
                                  type: string
                                  examples:
                                    - CH-00001
                                purchase_consumption_type:
                                  description: Purchase consumption type of the material
                                  type: string
                                  enum:
                                    - INHERIT
                                    - AUTOMATIC
                                    - MANUAL
                                  examples:
                                    - INHERIT
                                units:
                                  description: Indicates which kind of unit should this material be measured with
                                  type: string
                                  examples:
                                    - un
                                observations:
                                  description: Material observations
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - This is a observation
                                description:
                                  description: Description of the material
                                  type: string
                                  examples:
                                    - This is a chair
                                sku:
                                  description: SKU of the material
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - SKU-00001
                                ean_upc:
                                  description: EAN/UPC of the material
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - '1234567890123'
                                sale_price:
                                  description: Sale price of the material
                                  type: number
                                  examples:
                                    - 10
                                sale_vat:
                                  description: Sale VAT of the material
                                  type: number
                                  examples:
                                    - 23
                                created_at:
                                  description: Date of creation
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                  readOnly: true
                                updated_at:
                                  description: Last update date
                                  allOf:
                                    - type:
                                        - string
                                        - 'null'
                                      pattern: >-
                                        ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                        ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                      examples:
                                        - '2021-07-21 18:38:00'
                                  readOnly: true
                                warehouses_minimum_stocks:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      warehouse_id:
                                        type: integer
                                        examples:
                                          - 1
                                      warehouse_name:
                                        type: string
                                        examples:
                                          - Warehouse
                                      minimum_quantity:
                                        type: integer
                                        examples:
                                          - 10
                          required:
                            - id
                            - type
                            - attributes
                        - title: Other Cost
                          description: Other Cost model structure details
                          type: object
                          properties:
                            id:
                              description: The ID of the Other Cost
                              type: string
                              examples:
                                - '123'
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - other-cost
                              examples:
                                - other-cost
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                other_cost_id:
                                  description: The ID of the Other Cost
                                  type: integer
                                  examples:
                                    - 123
                                  readOnly: true
                                entity_id:
                                  description: The ID of the Entity
                                  type: integer
                                  examples:
                                    - 123
                                  readOnly: true
                                input_type:
                                  description: >-
                                    The type of Other Cost. Different types of Other Costs have different associated
                                    fields. Other Costs of type resource will measure its total cost based on how long
                                    (e.g. hours, minutes) the resource is occupied. Other Costs of type distance will
                                    measure its total cost based on how many units (e.g. meters, kilometers) are needed.
                                    Other Costs of type interval and time_range will measure its total cost based on
                                    duration. Other Costs of type currency will have a fixed cost manually defined for
                                    each operation. Other Costs of type custom_unit_of_measurement will measure its
                                    total cost based on how many units (e.g. m3, liters) are needed.
                                  type: string
                                  enum:
                                    - currency
                                    - distance
                                    - interval
                                    - time_range
                                    - resource
                                    - custom_unit_of_measurement
                                  examples:
                                    - currency
                                name:
                                  description: The name (or description) of the Other Cost
                                  type: string
                                  examples:
                                    - Contractual Labor
                                failure:
                                  description: >-
                                    Indicates if the Other Cost can be included in costs for Corrective Maintenance
                                    (Work Orders)
                                  type: boolean
                                  examples:
                                    - true
                                schedule_work:
                                  description: >-
                                    Indicates if the Other Cost can be included in costs for Preventive Maintenance
                                    (Planned Job Orders)
                                  type:
                                    - boolean
                                    - 'null'
                                  examples:
                                    - true
                                operator:
                                  description: >-
                                    Indicates if the Other Cost can be included in individual costs for operators
                                    (technicians)
                                  type:
                                    - boolean
                                    - 'null'
                                  examples:
                                    - true
                                icon:
                                  description: The icon to be presented for the Other Cost in Infraspeak platform.
                                  type: string
                                  enum:
                                    - truck
                                    - car
                                    - clock-o
                                    - bed
                                    - user
                                    - usd
                                    - cutlery
                                    - wrench
                                  examples:
                                    - truck
                                element:
                                  description: Indicates if the Other Cost can be included in costs for Assets
                                  type:
                                    - boolean
                                    - 'null'
                                  examples:
                                    - true
                                cost_per_unit:
                                  description: >-
                                    Cost per unit of the Other Cost. Specific for input_type "resource", "distance" or
                                    "custom_unit_of_measurement"
                                  type:
                                    - number
                                    - 'null'
                                  examples:
                                    - 2.5
                                default_sell_price:
                                  description: >-
                                    Default sell price of the Other Cost. Specific for input_type "resource", "distance"
                                    or "custom_unit_of_measurement"
                                  type:
                                    - number
                                    - 'null'
                                  examples:
                                    - 4
                                default_sell_vat:
                                  description: >-
                                    Default sale VAT/IVA percentage of the Other Cost. Specific for input_type
                                    "resource", "distance" or "custom_unit_of_measurement"
                                  type:
                                    - number
                                    - 'null'
                                  examples:
                                    - 23
                                unit:
                                  description: >-
                                    Unit of the Other Cost. Specific for input_type "resource", "distance" or
                                    "custom_unit_of_measurement"
                                  type:
                                    - string
                                    - 'null'
                            relationships:
                              description: The relationships of the Other Cost (Only present when expanded in the request)
                              type: object
                              properties:
                                customClientPrices:
                                  description: The Custom Client Prices associated with the Other Cost
                                  type: object
                                entity:
                                  description: The Entity where the Other Cost belongs
                                  type: object
                          required:
                            - id
                            - type
                            - attributes
                    uniqueItems: true
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
    delete:
      operationId: deleteSellOrderLine
      tags:
        - Sell Orders
      summary: Delete a Sell Order (Sale) Line
      description: This endpoint allows you to delete a Sell Order (Sale) Line for a specific Sell Order (Sale).
      parameters:
        - name: sellOrderId
          in: path
          description: The Sell Order (Sale) ID
          required: true
          schema:
            type: string
        - name: sellOrderLineId
          in: path
          description: The Sell Order (Sale) Line ID
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items: {}
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /stock-movements:
    get:
      operationId: getStockMovements
      tags:
        - Stock Movements
      summary: List all Stock Movements
      description: >
        This endpoint allows you to list all Stock Movements. A stock movevement correspondes to an action executed in a
        warehouse for a material.

        A stock movement can have the following actions:
          - `MOVED`: stock movement between two warehouses
          - `ADDED`: stock addition in a warehouse
          - `CONSUMED`: material consumption in a work order or planned job order
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      title: Stock Movement
                      description: Stock Movement model structure details
                      type: object
                      properties:
                        id:
                          description: ID of the Stock Movement
                          type: string
                          readOnly: true
                        type:
                          description: Model type
                          type: string
                          enum:
                            - stock-movement
                          readOnly: true
                        attributes:
                          type: object
                          properties:
                            stock_movement_id:
                              description: ID of the Stock Movement
                              type: integer
                              examples:
                                - 1
                              readOnly: true
                            warehouse_id:
                              description: ID of the warehouse associated to the Stock Movement
                              type: integer
                              readOnly: true
                            observation:
                              description: Description or notes about the Stock Movement
                              type:
                                - string
                                - 'null'
                              readOnly: true
                            date:
                              type: string
                              format: date-time
                              examples:
                                - '2020-08-28 08:48:00'
                              readOnly: true
                            action:
                              description: The action performed in this Stock Movement
                              type: string
                              enum:
                                - ADDED
                                - CONSUMED
                                - MOVED
                              readOnly: true
                            failure_id:
                              description: Id of the associated Failure
                              type:
                                - integer
                                - 'null'
                              readOnly: true
                            schedule_work_id:
                              description: Id of the associated Schedule Work
                              type:
                                - integer
                                - 'null'
                              readOnly: true
                            order_id:
                              description: Id of the associated Order
                              type:
                                - integer
                                - 'null'
                              readOnly: true
                            request_id:
                              description: Id of the associated Request
                              type:
                                - integer
                                - 'null'
                              readOnly: true
                            element_registry_id:
                              description: Id of the associated Element Registry
                              type:
                                - integer
                                - 'null'
                              readOnly: true
                      required:
                        - id
                        - type
                        - attributes
                  included:
                    description: List of relationships to be included
                    type: array
                    items:
                      type: object
                    uniqueItems: true
                  meta:
                    title: Meta
                    description: Meta model structure details
                    type: object
                    properties:
                      pagination:
                        type: object
                        properties:
                          total:
                            description: Total items.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          count:
                            description: Total items returned for the current page.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          per_page:
                            description: Maximum number of records per page.
                            type: integer
                            minimum: 1
                            default: 200
                            examples:
                              - 1
                          current_page:
                            description: Number of the current page.
                            type: integer
                            minimum: 1
                            default: 1
                          total_pages:
                            description: Number of the total pages.
                            type: integer
                            minimum: 1
                            default: 1
                        required:
                          - total
                          - count
                          - per_page
                          - current_page
                          - total_pages
                  links:
                    title: Response Links on listing operations
                    description: >-
                      Requests that return multiple items include a `links` attribute, with links related to request's
                      context.
                    type: object
                    properties:
                      self:
                        description: Current response link.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      first:
                        description: Link to the first page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      last:
                        description: Link to the previous page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      next:
                        description: Link to the next page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                    required:
                      - self
                      - first
                      - last
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
      deprecated: true
    post:
      operationId: createStockMovement
      tags:
        - Stock Movements
      summary: Create a Stock Movement
      description: >
        This endpoint allows you to create a Stock Movement. A stock movevement correspondes to an action executed in a
        warehouse for a material.

        A stock movement can have the following actions:
          - `MOVED`: stock movement between two warehouses
          - `ADDED`: stock addition in a warehouse
          - `CONSUMED`: material consumption in a work order or planned job order
      requestBody:
        content:
          application/json:
            schema:
              description: Stock Movement payload
              type: object
              properties:
                _type:
                  description: Type of the stock movement
                  type: string
                  enum:
                    - stock-movement
                action:
                  description: Action performed in this stock movement
                  type: string
                  enum:
                    - ABATE
                    - ADD
                    - CONSUME
                    - MOVE
                warehouse_id:
                  description: ID of the Origin warehouse of the stock movement
                  type: integer
                destination_warehouse_id:
                  description: ID of the destination warehouse of the stock movement (Required if action is MOVE)
                  type: integer
                element_registry_id:
                  description: ID of the associated element registry
                  type: integer
                failure_id:
                  description: ID of the associated failure
                  type: integer
                order_id:
                  description: ID of the associated order
                  type: integer
                request_id:
                  description: ID of the associated request
                  type: integer
                schedule_work_id:
                  description: ID of the associated schedule work
                  type: integer
                observation:
                  description: Description or notes about the stock movement
                  type: string
                stocks:
                  description: The stocks altered in the stock movement. This field is an array of stock objects.
                  type: array
                  items:
                    type: object
                    properties:
                      material_id:
                        description: ID of the associated Material. (required)
                        type: integer
                      quantity:
                        description: Quantity of the associated Material. (required and greater than 0)
                        type: number
              required:
                - _type
                - action
                - warehouse_id
                - stocks
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: Stock Movement
                    description: Stock Movement model structure details
                    type: object
                    properties:
                      id:
                        description: ID of the Stock Movement
                        type: string
                        readOnly: true
                      type:
                        description: Model type
                        type: string
                        enum:
                          - stock-movement
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          stock_movement_id:
                            description: ID of the Stock Movement
                            type: integer
                            examples:
                              - 1
                            readOnly: true
                          warehouse_id:
                            description: ID of the warehouse associated to the Stock Movement
                            type: integer
                            readOnly: true
                          observation:
                            description: Description or notes about the Stock Movement
                            type:
                              - string
                              - 'null'
                            readOnly: true
                          date:
                            type: string
                            format: date-time
                            examples:
                              - '2020-08-28 08:48:00'
                            readOnly: true
                          action:
                            description: The action performed in this Stock Movement
                            type: string
                            enum:
                              - ADDED
                              - CONSUMED
                              - MOVED
                            readOnly: true
                          failure_id:
                            description: Id of the associated Failure
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          schedule_work_id:
                            description: Id of the associated Schedule Work
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          order_id:
                            description: Id of the associated Order
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          request_id:
                            description: Id of the associated Request
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          element_registry_id:
                            description: Id of the associated Element Registry
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                    required:
                      - id
                      - type
                      - attributes
              examples:
                Example:
                  value:
                    data:
                      type: stock-movement
                      id: '1'
                      attributes:
                        stock_movement_id: 1
                        warehouse_id: 18
                        date: '2015-11-12 23:44:01'
                        action: MOVED
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
      deprecated: true
  /stock-movements/{stockMovement}:
    delete:
      operationId: deleteStockMovement
      tags:
        - Stock Movements
      summary: Delete Stock Movement
      description: >-
        This endpoint allows you to delete a specific Stock Movement. A stock movevement correspondes to an action
        executed in a warehouse for a material.
      parameters:
        - name: stockMovement
          in: path
          description: The Stock Movement ID
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items: {}
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
      deprecated: true
  /stocks:
    post:
      operationId: createStock
      tags:
        - Stocks
      summary: Create a Stock
      description: >
        This endpoint allows you to create a Stock.


        A stock represents a quantity of material that it is available in a warehouse that can be consumed, moved or
        added.

        A stock is always associated with a stock movement.
      requestBody:
        content:
          application/json:
            schema:
              description: Stock payload
              type: object
              properties:
                material_id:
                  description: ID of the material associated with the stock
                  type: integer
                  examples:
                    - 1
                quantity:
                  description: Quantity of the material associated with the stock
                  type: number
                  examples:
                    - 50
                warehouse_id:
                  description: The ID of the warehouse associated with the stock
                  type: integer
                  examples:
                    - 1
                failure_id:
                  description: The ID of the failure associated with the stock
                  type: integer
                  examples:
                    - 1
                schedule_work_id:
                  description: The ID of the schedule work associated with the stock
                  type: integer
                  examples:
                    - 1
              required:
                - material_id
                - warehouse_id
                - quantity
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: Stock
                    description: Stock model structure details
                    type: object
                    properties:
                      id:
                        description: ID of the Stock
                        type: string
                        readOnly: true
                      type:
                        description: Model type
                        type: string
                        enum:
                          - stock
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          stock_id:
                            description: ID of the Stock
                            type: integer
                            examples:
                              - 1
                            readOnly: true
                          stock_movement_id:
                            description: ID of the last Stock Movement of the Stock
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 1
                            readOnly: true
                          action:
                            description: Action performed for the stock
                            type:
                              - string
                              - 'null'
                            readOnly: true
                          warehouse_id:
                            description: ID of the warehouse associated with the stock
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          material_id:
                            description: ID of the material associated with the stock
                            type: integer
                            readOnly: true
                          quantity:
                            description: Quantity of the material present in the stock
                            type: number
                            readOnly: true
                          mean_price:
                            description: Mean price of the material associated with the stock
                            type:
                              - number
                              - 'null'
                            readOnly: true
                          observation:
                            description: Description or notes of the stock
                            type:
                              - string
                              - 'null'
                            readOnly: true
                          date:
                            type:
                              - string
                              - 'null'
                            format: date-time
                            examples:
                              - '2020-08-28 17:12:00'
                            readOnly: true
                          failure_id:
                            description: ID of the failure associated with the stock
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          schedule_work_id:
                            description: ID of the schedule work associated with this stock
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          mean_price_manually_updated:
                            description: Mean price of the stock (if it was manually updated)
                            type: boolean
                            default: false
                            readOnly: true
                          date_updated:
                            type:
                              - string
                              - 'null'
                            format: date-time
                            examples:
                              - '2020-08-28 17:12:00'
                            readOnly: true
                          destination_id:
                            description: >-
                              ID of the destination warehouse of the stock. Only present if the stock action is
                              "MOVED_FROM"
                            type: integer
                            readOnly: true
                          source_id:
                            description: ID of the origin warehouse of the stock. Only present if the stock action is "MOVED_TO"
                            type: integer
                            readOnly: true
                    required:
                      - id
                      - type
                      - attributes
              examples:
                Example:
                  value:
                    data:
                      type: stock
                      id: '0'
                      attributes:
                        stock_id: 0
                        stock_movement_id: 321
                        material_id: 59300
                        quantity: 50
                        mean_price_manually_updated: false
                        date_updated: '2021-10-25 15:46:50'
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
      deprecated: true
  /stocks/{stock}:
    patch:
      operationId: updateStock
      tags:
        - Stocks
      summary: Update Stock
      description: >
        This endpoint allows you to update a specific Stock.


        A stock represents a quantity of material that it is available in a warehouse that can be consumed, moved or
        added.

        A stock is always associated with a stock movement.
      parameters:
        - name: stock
          in: path
          description: The stock ID
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              description: Stock payload
              type: object
              properties:
                material_id:
                  description: ID of the material associated with the stock
                  type: integer
                  examples:
                    - 1
                quantity:
                  description: Quantity of the material associated with the stock
                  type: number
                  examples:
                    - 50
                warehouse_id:
                  description: The ID of the warehouse associated with the stock
                  type: integer
                  examples:
                    - 1
                failure_id:
                  description: The ID of the failure associated with the stock
                  type: integer
                  examples:
                    - 1
                schedule_work_id:
                  description: The ID of the schedule work associated with the stock
                  type: integer
                  examples:
                    - 1
                mean_price:
                  description: The mean price of the material associated with the stock
                  type: number
                  examples:
                    - 10
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: Stock
                    description: Stock model structure details
                    type: object
                    properties:
                      id:
                        description: ID of the Stock
                        type: string
                        readOnly: true
                      type:
                        description: Model type
                        type: string
                        enum:
                          - stock
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          stock_id:
                            description: ID of the Stock
                            type: integer
                            examples:
                              - 1
                            readOnly: true
                          stock_movement_id:
                            description: ID of the last Stock Movement of the Stock
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 1
                            readOnly: true
                          action:
                            description: Action performed for the stock
                            type:
                              - string
                              - 'null'
                            readOnly: true
                          warehouse_id:
                            description: ID of the warehouse associated with the stock
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          material_id:
                            description: ID of the material associated with the stock
                            type: integer
                            readOnly: true
                          quantity:
                            description: Quantity of the material present in the stock
                            type: number
                            readOnly: true
                          mean_price:
                            description: Mean price of the material associated with the stock
                            type:
                              - number
                              - 'null'
                            readOnly: true
                          observation:
                            description: Description or notes of the stock
                            type:
                              - string
                              - 'null'
                            readOnly: true
                          date:
                            type:
                              - string
                              - 'null'
                            format: date-time
                            examples:
                              - '2020-08-28 17:12:00'
                            readOnly: true
                          failure_id:
                            description: ID of the failure associated with the stock
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          schedule_work_id:
                            description: ID of the schedule work associated with this stock
                            type:
                              - integer
                              - 'null'
                            readOnly: true
                          mean_price_manually_updated:
                            description: Mean price of the stock (if it was manually updated)
                            type: boolean
                            default: false
                            readOnly: true
                          date_updated:
                            type:
                              - string
                              - 'null'
                            format: date-time
                            examples:
                              - '2020-08-28 17:12:00'
                            readOnly: true
                          destination_id:
                            description: >-
                              ID of the destination warehouse of the stock. Only present if the stock action is
                              "MOVED_FROM"
                            type: integer
                            readOnly: true
                          source_id:
                            description: ID of the origin warehouse of the stock. Only present if the stock action is "MOVED_TO"
                            type: integer
                            readOnly: true
                    required:
                      - id
                      - type
                      - attributes
              examples:
                Example:
                  value:
                    data:
                      type: stock
                      id: '0'
                      attributes:
                        stock_id: 0
                        stock_movement_id: 321
                        material_id: 59300
                        quantity: 50
                        mean_price_manually_updated: false
                        date_updated: '2021-10-25 15:46:50'
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
      deprecated: true
    delete:
      operationId: deleteStock
      tags:
        - Stocks
      summary: Delete Stock
      description: >
        This endpoint allows you to delete a specific Stock.


        A stock represents a quantity of material that it is available in a warehouse that can be consumed, moved or
        added.

        A stock is always associated with a stock movement.
      parameters:
        - name: stock
          in: path
          description: The stock ID
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items: {}
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
      deprecated: true
  /stocks/material-types:
    post:
      operationId: createMaterialType
      tags:
        - Materials
      summary: Create a material type
      description: This endpoint allows the user to create a material type.
      requestBody:
        content:
          application/json:
            schema:
              description: Create Material Type payload
              type: object
              properties:
                name:
                  description: Name of the material type.
                  type: string
                  minLength: 1
                  examples:
                    - Material Type 1
                code:
                  description: >-
                    Code of the material type. Not required in the endpoint request but will be generated internally
                    since there cannot be a material type without a code. When sent, needs to be unique.
                  type:
                    - string
                    - 'null'
                  examples:
                    - MT1
                parent_id:
                  description: ID of the material type folder to which this new material type will belong.
                  type: string
                  examples:
                    - '1'
              required:
                - name
                - parent_id
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: MaterialType
                    description: MaterialType model structure details
                    type: object
                    properties:
                      id:
                        description: ID of the Material Type
                        type: string
                        examples:
                          - '1'
                        readOnly: true
                      type:
                        description: Model type
                        type: string
                        enum:
                          - stock-material-type
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          material_type_id:
                            description: ID of the material type
                            type: string
                            examples:
                              - '1'
                            readOnly: true
                          parent_id:
                            description: ID of the associated parent folder of the material type
                            type: string
                            examples:
                              - '1'
                          name:
                            description: Name of the material type
                            type: string
                            examples:
                              - Chemical
                          code:
                            description: Code of the material type
                            type: string
                            examples:
                              - CH-00001
                          created_at:
                            description: Creation date
                            type: string
                            format: date-time
                            examples:
                              - '2021-01-01 00:00:00'
                          updated_at:
                            description: Last update date
                            type: string
                            format: date-time
                            examples:
                              - '2021-01-01 00:00:00'
                          deleted_at:
                            description: Deletion date
                            type:
                              - string
                              - 'null'
                            format: date-time
                            examples:
                              - '2021-01-01 00:00:00'
                  included:
                    description: List of relationships to be included
                    type: array
                    items:
                      title: Material
                      description: Material model structure details
                      type: object
                      properties:
                        id:
                          description: ID of the Material
                          type: string
                          readOnly: true
                          examples:
                            - '1'
                        type:
                          description: Model type
                          type: string
                          enum:
                            - stock-material
                          readOnly: true
                          examples:
                            - stock-material
                        attributes:
                          type: object
                          properties:
                            material_id:
                              description: ID of the material
                              type: string
                              readOnly: true
                              examples:
                                - '1'
                            material_type_id:
                              description: ID of the material type
                              type: string
                              readOnly: true
                              examples:
                                - '11'
                            name:
                              description: Name of the material
                              type: string
                              examples:
                                - Chair
                            code:
                              description: Code of the material
                              type: string
                              examples:
                                - CH-00001
                            purchase_consumption_type:
                              description: Purchase consumption type of the material
                              type: string
                              enum:
                                - INHERIT
                                - AUTOMATIC
                                - MANUAL
                              examples:
                                - INHERIT
                            units:
                              description: Indicates which kind of unit should this material be measured with
                              type: string
                              examples:
                                - un
                            observations:
                              description: Material observations
                              type:
                                - string
                                - 'null'
                              examples:
                                - This is a observation
                            description:
                              description: Description of the material
                              type: string
                              examples:
                                - This is a chair
                            sku:
                              description: SKU of the material
                              type:
                                - string
                                - 'null'
                              examples:
                                - SKU-00001
                            ean_upc:
                              description: EAN/UPC of the material
                              type:
                                - string
                                - 'null'
                              examples:
                                - '1234567890123'
                            sale_price:
                              description: Sale price of the material
                              type: number
                              examples:
                                - 10
                            sale_vat:
                              description: Sale VAT of the material
                              type: number
                              examples:
                                - 23
                            created_at:
                              description: Date of creation
                              allOf:
                                - type:
                                    - string
                                    - 'null'
                                  pattern: >-
                                    ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                    ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                  examples:
                                    - '2021-07-21 18:38:00'
                              readOnly: true
                            updated_at:
                              description: Last update date
                              allOf:
                                - type:
                                    - string
                                    - 'null'
                                  pattern: >-
                                    ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                    ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                  examples:
                                    - '2021-07-21 18:38:00'
                              readOnly: true
                            warehouses_minimum_stocks:
                              type: array
                              items:
                                type: object
                                properties:
                                  warehouse_id:
                                    type: integer
                                    examples:
                                      - 1
                                  warehouse_name:
                                    type: string
                                    examples:
                                      - Warehouse
                                  minimum_quantity:
                                    type: integer
                                    examples:
                                      - 10
                      required:
                        - id
                        - type
                        - attributes
                    uniqueItems: true
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /stocks/material-types/{materialTypeId}:
    delete:
      operationId: deleteMaterialType
      tags:
        - Materials
      summary: Delete a material type
      description: This endpoint allows the user to delete a specific Material Type.
      parameters:
        - name: materialTypeId
          in: path
          description: The material type ID
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items: {}
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
      x-toolbox: true
    patch:
      operationId: updateMaterialType
      tags:
        - Materials
      summary: Update a material type
      description: This endpoint allows the user to change data from a specific Material Type.
      parameters:
        - name: materialTypeId
          in: path
          description: The material type ID
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              description: Update Material Type payload
              type: object
              properties:
                name:
                  description: Name of the material type.
                  type: string
                  minLength: 1
                  examples:
                    - Material Type 1
                code:
                  description: Code of the material type. Needs to be unique.
                  type: string
                  examples:
                    - MT1
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: MaterialType
                    description: MaterialType model structure details
                    type: object
                    properties:
                      id:
                        description: ID of the Material Type
                        type: string
                        examples:
                          - '1'
                        readOnly: true
                      type:
                        description: Model type
                        type: string
                        enum:
                          - stock-material-type
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          material_type_id:
                            description: ID of the material type
                            type: string
                            examples:
                              - '1'
                            readOnly: true
                          parent_id:
                            description: ID of the associated parent folder of the material type
                            type: string
                            examples:
                              - '1'
                          name:
                            description: Name of the material type
                            type: string
                            examples:
                              - Chemical
                          code:
                            description: Code of the material type
                            type: string
                            examples:
                              - CH-00001
                          created_at:
                            description: Creation date
                            type: string
                            format: date-time
                            examples:
                              - '2021-01-01 00:00:00'
                          updated_at:
                            description: Last update date
                            type: string
                            format: date-time
                            examples:
                              - '2021-01-01 00:00:00'
                          deleted_at:
                            description: Deletion date
                            type:
                              - string
                              - 'null'
                            format: date-time
                            examples:
                              - '2021-01-01 00:00:00'
                  included:
                    description: List of relationships to be included
                    type: array
                    items:
                      title: Material
                      description: Material model structure details
                      type: object
                      properties:
                        id:
                          description: ID of the Material
                          type: string
                          readOnly: true
                          examples:
                            - '1'
                        type:
                          description: Model type
                          type: string
                          enum:
                            - stock-material
                          readOnly: true
                          examples:
                            - stock-material
                        attributes:
                          type: object
                          properties:
                            material_id:
                              description: ID of the material
                              type: string
                              readOnly: true
                              examples:
                                - '1'
                            material_type_id:
                              description: ID of the material type
                              type: string
                              readOnly: true
                              examples:
                                - '11'
                            name:
                              description: Name of the material
                              type: string
                              examples:
                                - Chair
                            code:
                              description: Code of the material
                              type: string
                              examples:
                                - CH-00001
                            purchase_consumption_type:
                              description: Purchase consumption type of the material
                              type: string
                              enum:
                                - INHERIT
                                - AUTOMATIC
                                - MANUAL
                              examples:
                                - INHERIT
                            units:
                              description: Indicates which kind of unit should this material be measured with
                              type: string
                              examples:
                                - un
                            observations:
                              description: Material observations
                              type:
                                - string
                                - 'null'
                              examples:
                                - This is a observation
                            description:
                              description: Description of the material
                              type: string
                              examples:
                                - This is a chair
                            sku:
                              description: SKU of the material
                              type:
                                - string
                                - 'null'
                              examples:
                                - SKU-00001
                            ean_upc:
                              description: EAN/UPC of the material
                              type:
                                - string
                                - 'null'
                              examples:
                                - '1234567890123'
                            sale_price:
                              description: Sale price of the material
                              type: number
                              examples:
                                - 10
                            sale_vat:
                              description: Sale VAT of the material
                              type: number
                              examples:
                                - 23
                            created_at:
                              description: Date of creation
                              allOf:
                                - type:
                                    - string
                                    - 'null'
                                  pattern: >-
                                    ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                    ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                  examples:
                                    - '2021-07-21 18:38:00'
                              readOnly: true
                            updated_at:
                              description: Last update date
                              allOf:
                                - type:
                                    - string
                                    - 'null'
                                  pattern: >-
                                    ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                    ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                  examples:
                                    - '2021-07-21 18:38:00'
                              readOnly: true
                            warehouses_minimum_stocks:
                              type: array
                              items:
                                type: object
                                properties:
                                  warehouse_id:
                                    type: integer
                                    examples:
                                      - 1
                                  warehouse_name:
                                    type: string
                                    examples:
                                      - Warehouse
                                  minimum_quantity:
                                    type: integer
                                    examples:
                                      - 10
                      required:
                        - id
                        - type
                        - attributes
                    uniqueItems: true
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /stocks/material-types/folders:
    get:
      operationId: getMaterialTypeFolders
      tags:
        - Materials
      summary: Get all material type folders
      description: Returns a paginated list of all material type folders for the authenticated entity, including their full code.
      parameters:
        - name: search_text
          in: query
          description: Text string to search for
          required: false
          schema:
            type: string
        - name: sort
          in: query
          description: The name of the attribute to use for sort order
          required: false
          schema:
            type: string
            default: name
        - name: order
          in: query
          description: The direction of the sort order
          required: false
          schema:
            type: string
            enum:
              - asc
              - desc
            default: asc
        - name: page
          in: query
          description: The page number (1-based) to retrieve the results, according to the `limit` defined
          required: false
          schema:
            type: integer
            default: 1
        - name: limit
          in: query
          description: Limit to restrict the number of entries per page
          required: false
          schema:
            type: integer
            default: 200
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      title: MaterialTypeFolderGet
                      description: MaterialTypeFolder returned by GET endpoints, including full_code
                      allOf:
                        - title: MaterialTypeFolder
                          description: MaterialTypeFolder model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Material Type Folder
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - stock-material-type-folder
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                material_type_folder_id:
                                  description: ID of the material type folder
                                  type: string
                                  examples:
                                    - '1'
                                  readOnly: true
                                parent_id:
                                  description: ID of the associated folder of the material type folder
                                  type: string
                                  examples:
                                    - '1'
                                name:
                                  description: Name of the material type folder
                                  type: string
                                  examples:
                                    - Chemical
                                code:
                                  description: Code of the material type folder
                                  type: string
                                  examples:
                                    - CH-00001
                                created_at:
                                  description: Creation date
                                  type: string
                                  format: date-time
                                  examples:
                                    - '2021-01-01 00:00:00'
                                updated_at:
                                  description: Last update date
                                  type: string
                                  format: date-time
                                  examples:
                                    - '2021-01-01 00:00:00'
                                deleted_at:
                                  description: Deletion date
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  examples:
                                    - '2021-01-01 00:00:00'
                        - type: object
                          properties:
                            attributes:
                              type: object
                              properties:
                                full_code:
                                  description: Full hierarchical code composed of ancestor codes separated by dots
                                  type:
                                    - string
                                  examples:
                                    - CH.SUB.001
                                  readOnly: true
                  meta:
                    title: Meta
                    description: Meta model structure details
                    type: object
                    properties:
                      pagination:
                        type: object
                        properties:
                          total:
                            description: Total items.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          count:
                            description: Total items returned for the current page.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          per_page:
                            description: Maximum number of records per page.
                            type: integer
                            minimum: 1
                            default: 200
                            examples:
                              - 1
                          current_page:
                            description: Number of the current page.
                            type: integer
                            minimum: 1
                            default: 1
                          total_pages:
                            description: Number of the total pages.
                            type: integer
                            minimum: 1
                            default: 1
                        required:
                          - total
                          - count
                          - per_page
                          - current_page
                          - total_pages
                  links:
                    title: Response Links on listing operations
                    description: >-
                      Requests that return multiple items include a `links` attribute, with links related to request's
                      context.
                    type: object
                    properties:
                      self:
                        description: Current response link.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      first:
                        description: Link to the first page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      last:
                        description: Link to the previous page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      next:
                        description: Link to the next page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                    required:
                      - self
                      - first
                      - last
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
    post:
      operationId: createMaterialTypeFolder
      tags:
        - Materials
      summary: Create a material type folder
      description: This endpoint allows the user to create a material type folder.
      requestBody:
        content:
          application/json:
            schema:
              description: Create Material Type Folder payload
              type: object
              properties:
                name:
                  description: Name of the material type folder.
                  type: string
                  minLength: 1
                  examples:
                    - Material Type Folder 1
                code:
                  description: >-
                    Code of the material type folder. Not required in the endpoint request but will be generated
                    internally since there cannot be a material type folder without a code. When sent, needs to be
                    unique.
                  type:
                    - string
                    - 'null'
                  examples:
                    - MTF1
                parent_id:
                  description: ID of the parent material type folder
                  type: string
                  examples:
                    - '1'
              required:
                - name
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: MaterialTypeFolder
                    description: MaterialTypeFolder model structure details
                    type: object
                    properties:
                      id:
                        description: ID of the Material Type Folder
                        type: string
                        readOnly: true
                      type:
                        description: Model type
                        type: string
                        enum:
                          - stock-material-type-folder
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          material_type_folder_id:
                            description: ID of the material type folder
                            type: string
                            examples:
                              - '1'
                            readOnly: true
                          parent_id:
                            description: ID of the associated folder of the material type folder
                            type: string
                            examples:
                              - '1'
                          name:
                            description: Name of the material type folder
                            type: string
                            examples:
                              - Chemical
                          code:
                            description: Code of the material type folder
                            type: string
                            examples:
                              - CH-00001
                          created_at:
                            description: Creation date
                            type: string
                            format: date-time
                            examples:
                              - '2021-01-01 00:00:00'
                          updated_at:
                            description: Last update date
                            type: string
                            format: date-time
                            examples:
                              - '2021-01-01 00:00:00'
                          deleted_at:
                            description: Deletion date
                            type:
                              - string
                              - 'null'
                            format: date-time
                            examples:
                              - '2021-01-01 00:00:00'
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /stocks/material-types/folders/{materialTypeFolderId}:
    get:
      operationId: getMaterialTypeFolder
      tags:
        - Materials
      summary: Get a material type folder
      description: Returns a single material type folder including its full code.
      parameters:
        - name: materialTypeFolderId
          in: path
          description: The material type folder ID
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: MaterialTypeFolderGet
                    description: MaterialTypeFolder returned by GET endpoints, including full_code
                    allOf:
                      - title: MaterialTypeFolder
                        description: MaterialTypeFolder model structure details
                        type: object
                        properties:
                          id:
                            description: ID of the Material Type Folder
                            type: string
                            readOnly: true
                          type:
                            description: Model type
                            type: string
                            enum:
                              - stock-material-type-folder
                            readOnly: true
                          attributes:
                            type: object
                            properties:
                              material_type_folder_id:
                                description: ID of the material type folder
                                type: string
                                examples:
                                  - '1'
                                readOnly: true
                              parent_id:
                                description: ID of the associated folder of the material type folder
                                type: string
                                examples:
                                  - '1'
                              name:
                                description: Name of the material type folder
                                type: string
                                examples:
                                  - Chemical
                              code:
                                description: Code of the material type folder
                                type: string
                                examples:
                                  - CH-00001
                              created_at:
                                description: Creation date
                                type: string
                                format: date-time
                                examples:
                                  - '2021-01-01 00:00:00'
                              updated_at:
                                description: Last update date
                                type: string
                                format: date-time
                                examples:
                                  - '2021-01-01 00:00:00'
                              deleted_at:
                                description: Deletion date
                                type:
                                  - string
                                  - 'null'
                                format: date-time
                                examples:
                                  - '2021-01-01 00:00:00'
                      - type: object
                        properties:
                          attributes:
                            type: object
                            properties:
                              full_code:
                                description: Full hierarchical code composed of ancestor codes separated by dots
                                type:
                                  - string
                                examples:
                                  - CH.SUB.001
                                readOnly: true
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
    patch:
      operationId: updateMaterialTypeFolder
      tags:
        - Materials
      summary: Update a material type folder
      description: This endpoint allows the user to change the data from a specific Material Type Folder.
      parameters:
        - name: materialTypeFolderId
          in: path
          description: The material type folder ID
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              description: Update Material Type Folder payload
              type: object
              properties:
                name:
                  description: Name of the material type folder.
                  type: string
                  minLength: 1
                  examples:
                    - Material Type Folder 1
                code:
                  description: Code of the material type folder. Needs to be unique.
                  type: string
                  examples:
                    - MTF1
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: MaterialTypeFolder
                    description: MaterialTypeFolder model structure details
                    type: object
                    properties:
                      id:
                        description: ID of the Material Type Folder
                        type: string
                        readOnly: true
                      type:
                        description: Model type
                        type: string
                        enum:
                          - stock-material-type-folder
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          material_type_folder_id:
                            description: ID of the material type folder
                            type: string
                            examples:
                              - '1'
                            readOnly: true
                          parent_id:
                            description: ID of the associated folder of the material type folder
                            type: string
                            examples:
                              - '1'
                          name:
                            description: Name of the material type folder
                            type: string
                            examples:
                              - Chemical
                          code:
                            description: Code of the material type folder
                            type: string
                            examples:
                              - CH-00001
                          created_at:
                            description: Creation date
                            type: string
                            format: date-time
                            examples:
                              - '2021-01-01 00:00:00'
                          updated_at:
                            description: Last update date
                            type: string
                            format: date-time
                            examples:
                              - '2021-01-01 00:00:00'
                          deleted_at:
                            description: Deletion date
                            type:
                              - string
                              - 'null'
                            format: date-time
                            examples:
                              - '2021-01-01 00:00:00'
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
    delete:
      operationId: deleteMaterialTypeFolder
      tags:
        - Materials
      summary: Delete a material type folder
      description: This endpoint allows the user to delete a specific Material Type Folder.
      parameters:
        - name: materialTypeFolderId
          in: path
          description: The material type folder ID
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items: {}
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
      x-toolbox: true
  /stocks/material-types/root-folders:
    get:
      operationId: getMaterialTypeRootFolders
      tags:
        - Materials
      summary: Get all material type root folders
      description: This endpoint allows the user to get the first level of material type folders
      parameters:
        - name: sort
          in: query
          description: The name of the attribute to use for sort order
          required: false
          schema:
            type: string
            default: name
        - name: order
          in: query
          description: The direction of the sort order
          required: false
          schema:
            type: string
            enum:
              - asc
              - desc
            default: asc
        - name: page
          in: query
          description: The page number (1-based) to retrieve the results, according to the `limit` defined
          required: false
          schema:
            type: integer
            default: 1
        - name: limit
          in: query
          description: Limit to restrict the number of entries per page
          required: false
          schema:
            type: integer
            default: 200
        - name: date_min_updated_at
          in: query
          description: Filter by minimum updated_at.
          required: false
          schema:
            type: string
            format: date-time
        - name: date_max_updated_at
          in: query
          description: Filter by maximum updated_at.
          required: false
          schema:
            type: string
            format: date-time
        - name: s_code
          in: query
          description: Filter by code.
          required: false
          schema:
            type: string
        - name: s_name
          in: query
          description: Filter by name.
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      title: MaterialTypeFolder
                      description: MaterialTypeFolder model structure details
                      type: object
                      properties:
                        id:
                          description: ID of the Material Type Folder
                          type: string
                          readOnly: true
                        type:
                          description: Model type
                          type: string
                          enum:
                            - stock-material-type-folder
                          readOnly: true
                        attributes:
                          type: object
                          properties:
                            material_type_folder_id:
                              description: ID of the material type folder
                              type: string
                              examples:
                                - '1'
                              readOnly: true
                            parent_id:
                              description: ID of the associated folder of the material type folder
                              type: string
                              examples:
                                - '1'
                            name:
                              description: Name of the material type folder
                              type: string
                              examples:
                                - Chemical
                            code:
                              description: Code of the material type folder
                              type: string
                              examples:
                                - CH-00001
                            created_at:
                              description: Creation date
                              type: string
                              format: date-time
                              examples:
                                - '2021-01-01 00:00:00'
                            updated_at:
                              description: Last update date
                              type: string
                              format: date-time
                              examples:
                                - '2021-01-01 00:00:00'
                            deleted_at:
                              description: Deletion date
                              type:
                                - string
                                - 'null'
                              format: date-time
                              examples:
                                - '2021-01-01 00:00:00'
                  meta:
                    title: Meta
                    description: Meta model structure details
                    type: object
                    properties:
                      pagination:
                        type: object
                        properties:
                          total:
                            description: Total items.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          count:
                            description: Total items returned for the current page.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          per_page:
                            description: Maximum number of records per page.
                            type: integer
                            minimum: 1
                            default: 200
                            examples:
                              - 1
                          current_page:
                            description: Number of the current page.
                            type: integer
                            minimum: 1
                            default: 1
                          total_pages:
                            description: Number of the total pages.
                            type: integer
                            minimum: 1
                            default: 1
                        required:
                          - total
                          - count
                          - per_page
                          - current_page
                          - total_pages
                  links:
                    title: Response Links on listing operations
                    description: >-
                      Requests that return multiple items include a `links` attribute, with links related to request's
                      context.
                    type: object
                    properties:
                      self:
                        description: Current response link.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      first:
                        description: Link to the first page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      last:
                        description: Link to the previous page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      next:
                        description: Link to the next page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                    required:
                      - self
                      - first
                      - last
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /stocks/material-types/folders/{materialTypeFolderId}/children:
    get:
      operationId: getMaterialTypeChildren
      tags:
        - Materials
      summary: Get all material type folder children
      description: This endpoint allows the user to get folders and material types inside of a material type folder.
      parameters:
        - name: materialTypeFolderId
          in: path
          description: The material type folder ID
          required: true
          schema:
            type: string
        - name: sort
          in: query
          description: The name of the attribute to use for sort order
          required: false
          schema:
            type: string
            default: name
        - name: order
          in: query
          description: The direction of the sort order
          required: false
          schema:
            type: string
            enum:
              - asc
              - desc
            default: asc
        - name: page
          in: query
          description: The page number (1-based) to retrieve the results, according to the `limit` defined
          required: false
          schema:
            type: integer
            default: 1
        - name: limit
          in: query
          description: Limit to restrict the number of entries per page
          required: false
          schema:
            type: integer
            default: 200
        - name: only_associated_to_materials
          in: query
          description: Get only child material types that are associated with materials.
          required: false
          schema:
            type: boolean
            default: false
        - name: date_min_updated_at
          in: query
          description: Filter by minimum updated_at.
          required: false
          schema:
            type: string
            format: date-time
        - name: date_max_updated_at
          in: query
          description: Filter by maximum updated_at.
          required: false
          schema:
            type: string
            format: date-time
        - name: s_code
          in: query
          description: Filter by code.
          required: false
          schema:
            type: string
        - name: s_name
          in: query
          description: Filter by name.
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      anyOf:
                        - title: MaterialTypeFolder
                          description: MaterialTypeFolder model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Material Type Folder
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - stock-material-type-folder
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                material_type_folder_id:
                                  description: ID of the material type folder
                                  type: string
                                  examples:
                                    - '1'
                                  readOnly: true
                                parent_id:
                                  description: ID of the associated folder of the material type folder
                                  type: string
                                  examples:
                                    - '1'
                                name:
                                  description: Name of the material type folder
                                  type: string
                                  examples:
                                    - Chemical
                                code:
                                  description: Code of the material type folder
                                  type: string
                                  examples:
                                    - CH-00001
                                created_at:
                                  description: Creation date
                                  type: string
                                  format: date-time
                                  examples:
                                    - '2021-01-01 00:00:00'
                                updated_at:
                                  description: Last update date
                                  type: string
                                  format: date-time
                                  examples:
                                    - '2021-01-01 00:00:00'
                                deleted_at:
                                  description: Deletion date
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  examples:
                                    - '2021-01-01 00:00:00'
                        - title: MaterialType
                          description: MaterialType model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Material Type
                              type: string
                              examples:
                                - '1'
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - stock-material-type
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                material_type_id:
                                  description: ID of the material type
                                  type: string
                                  examples:
                                    - '1'
                                  readOnly: true
                                parent_id:
                                  description: ID of the associated parent folder of the material type
                                  type: string
                                  examples:
                                    - '1'
                                name:
                                  description: Name of the material type
                                  type: string
                                  examples:
                                    - Chemical
                                code:
                                  description: Code of the material type
                                  type: string
                                  examples:
                                    - CH-00001
                                created_at:
                                  description: Creation date
                                  type: string
                                  format: date-time
                                  examples:
                                    - '2021-01-01 00:00:00'
                                updated_at:
                                  description: Last update date
                                  type: string
                                  format: date-time
                                  examples:
                                    - '2021-01-01 00:00:00'
                                deleted_at:
                                  description: Deletion date
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  examples:
                                    - '2021-01-01 00:00:00'
                  meta:
                    title: Meta
                    description: Meta model structure details
                    type: object
                    properties:
                      pagination:
                        type: object
                        properties:
                          total:
                            description: Total items.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          count:
                            description: Total items returned for the current page.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          per_page:
                            description: Maximum number of records per page.
                            type: integer
                            minimum: 1
                            default: 200
                            examples:
                              - 1
                          current_page:
                            description: Number of the current page.
                            type: integer
                            minimum: 1
                            default: 1
                          total_pages:
                            description: Number of the total pages.
                            type: integer
                            minimum: 1
                            default: 1
                        required:
                          - total
                          - count
                          - per_page
                          - current_page
                          - total_pages
                  links:
                    title: Response Links on listing operations
                    description: >-
                      Requests that return multiple items include a `links` attribute, with links related to request's
                      context.
                    type: object
                    properties:
                      self:
                        description: Current response link.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      first:
                        description: Link to the first page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      last:
                        description: Link to the previous page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      next:
                        description: Link to the next page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                    required:
                      - self
                      - first
                      - last
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /stocks/material-types/ancestor-folders/{materialTypeId}:
    get:
      operationId: getMaterialTypeAncestors
      tags:
        - Materials
      summary: Get a material type ancestor folders
      description: This endpoint allows the user to get all folder path of a specific material type.
      parameters:
        - name: materialTypeId
          in: path
          description: The material type ID
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: MaterialTypeFolder
                    description: MaterialTypeFolder model structure details
                    type: object
                    properties:
                      id:
                        description: ID of the Material Type Folder
                        type: string
                        readOnly: true
                      type:
                        description: Model type
                        type: string
                        enum:
                          - stock-material-type-folder
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          material_type_folder_id:
                            description: ID of the material type folder
                            type: string
                            examples:
                              - '1'
                            readOnly: true
                          parent_id:
                            description: ID of the associated folder of the material type folder
                            type: string
                            examples:
                              - '1'
                          name:
                            description: Name of the material type folder
                            type: string
                            examples:
                              - Chemical
                          code:
                            description: Code of the material type folder
                            type: string
                            examples:
                              - CH-00001
                          created_at:
                            description: Creation date
                            type: string
                            format: date-time
                            examples:
                              - '2021-01-01 00:00:00'
                          updated_at:
                            description: Last update date
                            type: string
                            format: date-time
                            examples:
                              - '2021-01-01 00:00:00'
                          deleted_at:
                            description: Deletion date
                            type:
                              - string
                              - 'null'
                            format: date-time
                            examples:
                              - '2021-01-01 00:00:00'
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /stocks/material-types/folders/{materialTypeFolderId}/ancestor-folders:
    get:
      operationId: getMaterialTypeFolderAncestors
      tags:
        - Materials
      summary: Get a material type folder ancestor folders
      description: This endpoint allows the user to get all folder path of a specific material type folder.
      parameters:
        - name: materialTypeFolderId
          in: path
          description: The material type folder ID
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: MaterialTypeFolder
                    description: MaterialTypeFolder model structure details
                    type: object
                    properties:
                      id:
                        description: ID of the Material Type Folder
                        type: string
                        readOnly: true
                      type:
                        description: Model type
                        type: string
                        enum:
                          - stock-material-type-folder
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          material_type_folder_id:
                            description: ID of the material type folder
                            type: string
                            examples:
                              - '1'
                            readOnly: true
                          parent_id:
                            description: ID of the associated folder of the material type folder
                            type: string
                            examples:
                              - '1'
                          name:
                            description: Name of the material type folder
                            type: string
                            examples:
                              - Chemical
                          code:
                            description: Code of the material type folder
                            type: string
                            examples:
                              - CH-00001
                          created_at:
                            description: Creation date
                            type: string
                            format: date-time
                            examples:
                              - '2021-01-01 00:00:00'
                          updated_at:
                            description: Last update date
                            type: string
                            format: date-time
                            examples:
                              - '2021-01-01 00:00:00'
                          deleted_at:
                            description: Deletion date
                            type:
                              - string
                              - 'null'
                            format: date-time
                            examples:
                              - '2021-01-01 00:00:00'
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /stocks/material-types/folders/{materialTypeFolderId}/deep-material-types:
    get:
      operationId: getMaterialTypeFolderDeepMaterialTypes
      tags:
        - Materials
      summary: Get a material type folder child material types
      description: This endpoint allows the user to get all material types inside a specific folder and its subfolders.
      parameters:
        - name: materialTypeFolderId
          in: path
          description: The material type folder ID
          required: true
          schema:
            type: string
        - name: sort
          in: query
          description: The name of the attribute to use for sort order
          required: false
          schema:
            type: string
            default: name
        - name: order
          in: query
          description: The direction of the sort order
          required: false
          schema:
            type: string
            enum:
              - asc
              - desc
            default: asc
        - name: page
          in: query
          description: The page number (1-based) to retrieve the results, according to the `limit` defined
          required: false
          schema:
            type: integer
            default: 1
        - name: limit
          in: query
          description: Limit to restrict the number of entries per page
          required: false
          schema:
            type: integer
            default: 200
        - name: s_code
          in: query
          description: Filter by code.
          required: false
          schema:
            type: string
        - name: s_name
          in: query
          description: Filter by name.
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: MaterialType
                    description: MaterialType model structure details
                    type: object
                    properties:
                      id:
                        description: ID of the Material Type
                        type: string
                        examples:
                          - '1'
                        readOnly: true
                      type:
                        description: Model type
                        type: string
                        enum:
                          - stock-material-type
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          material_type_id:
                            description: ID of the material type
                            type: string
                            examples:
                              - '1'
                            readOnly: true
                          parent_id:
                            description: ID of the associated parent folder of the material type
                            type: string
                            examples:
                              - '1'
                          name:
                            description: Name of the material type
                            type: string
                            examples:
                              - Chemical
                          code:
                            description: Code of the material type
                            type: string
                            examples:
                              - CH-00001
                          created_at:
                            description: Creation date
                            type: string
                            format: date-time
                            examples:
                              - '2021-01-01 00:00:00'
                          updated_at:
                            description: Last update date
                            type: string
                            format: date-time
                            examples:
                              - '2021-01-01 00:00:00'
                          deleted_at:
                            description: Deletion date
                            type:
                              - string
                              - 'null'
                            format: date-time
                            examples:
                              - '2021-01-01 00:00:00'
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /stocks/material-types/folders/tree:
    get:
      operationId: getMaterialTypeFolderTree
      tags:
        - Materials
      summary: Get the complete tree of material types
      description: This endpoint allows the user to get the tree of material types with folders and types.
      parameters:
        - name: search_text
          in: query
          description: Text string to search for
          required: false
          schema:
            type: string
        - name: searchText
          in: query
          description: Text string to search for
          required: false
          deprecated: true
          schema:
            type: string
        - name: sort
          in: query
          description: The name of the attribute to use for sort order
          required: false
          schema:
            type: string
            default: name
        - name: order
          in: query
          description: The direction of the sort order
          required: false
          schema:
            type: string
            enum:
              - asc
              - desc
            default: asc
        - name: include_trashed
          in: query
          description: Whether to include trashed items in the response
          required: false
          schema:
            type: boolean
            default: false
        - name: includeTrashed
          in: query
          description: Whether to include trashed items in the response
          required: false
          deprecated: true
          schema:
            type: boolean
            default: false
        - name: date_min_updated_at
          in: query
          description: Filter by minimum updated_at.
          required: false
          schema:
            type: string
            format: date-time
        - name: updatedAtAfter
          in: query
          description: Filter for a minimum date-time given
          required: false
          deprecated: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      anyOf:
                        - title: MaterialTypeFolder
                          description: MaterialTypeFolder model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Material Type Folder
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - stock-material-type-folder
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                material_type_folder_id:
                                  description: ID of the material type folder
                                  type: string
                                  examples:
                                    - '1'
                                  readOnly: true
                                parent_id:
                                  description: ID of the associated folder of the material type folder
                                  type: string
                                  examples:
                                    - '1'
                                name:
                                  description: Name of the material type folder
                                  type: string
                                  examples:
                                    - Chemical
                                code:
                                  description: Code of the material type folder
                                  type: string
                                  examples:
                                    - CH-00001
                                created_at:
                                  description: Creation date
                                  type: string
                                  format: date-time
                                  examples:
                                    - '2021-01-01 00:00:00'
                                updated_at:
                                  description: Last update date
                                  type: string
                                  format: date-time
                                  examples:
                                    - '2021-01-01 00:00:00'
                                deleted_at:
                                  description: Deletion date
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  examples:
                                    - '2021-01-01 00:00:00'
                        - title: MaterialType
                          description: MaterialType model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Material Type
                              type: string
                              examples:
                                - '1'
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - stock-material-type
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                material_type_id:
                                  description: ID of the material type
                                  type: string
                                  examples:
                                    - '1'
                                  readOnly: true
                                parent_id:
                                  description: ID of the associated parent folder of the material type
                                  type: string
                                  examples:
                                    - '1'
                                name:
                                  description: Name of the material type
                                  type: string
                                  examples:
                                    - Chemical
                                code:
                                  description: Code of the material type
                                  type: string
                                  examples:
                                    - CH-00001
                                created_at:
                                  description: Creation date
                                  type: string
                                  format: date-time
                                  examples:
                                    - '2021-01-01 00:00:00'
                                updated_at:
                                  description: Last update date
                                  type: string
                                  format: date-time
                                  examples:
                                    - '2021-01-01 00:00:00'
                                deleted_at:
                                  description: Deletion date
                                  type:
                                    - string
                                    - 'null'
                                  format: date-time
                                  examples:
                                    - '2021-01-01 00:00:00'
                  meta:
                    title: Meta
                    description: Meta model structure details
                    type: object
                    properties:
                      pagination:
                        type: object
                        properties:
                          total:
                            description: Total items.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          count:
                            description: Total items returned for the current page.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          per_page:
                            description: Maximum number of records per page.
                            type: integer
                            minimum: 1
                            default: 200
                            examples:
                              - 1
                          current_page:
                            description: Number of the current page.
                            type: integer
                            minimum: 1
                            default: 1
                          total_pages:
                            description: Number of the total pages.
                            type: integer
                            minimum: 1
                            default: 1
                        required:
                          - total
                          - count
                          - per_page
                          - current_page
                          - total_pages
                  links:
                    title: Response Links on listing operations
                    description: >-
                      Requests that return multiple items include a `links` attribute, with links related to request's
                      context.
                    type: object
                    properties:
                      self:
                        description: Current response link.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      first:
                        description: Link to the first page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      last:
                        description: Link to the previous page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      next:
                        description: Link to the next page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                    required:
                      - self
                      - first
                      - last
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /stocks/materials:
    get:
      operationId: getAllStockMaterials
      tags:
        - Materials
      summary: List all the materials
      description: This endpoint allows you to list all the materials.
      parameters:
        - name: expanded
          in: query
          description: Comma-separated list of relations to include in the response
          schema:
            type: string
            enum:
              - material_type
              - warehouse
              - supplier_custom_price
        - name: searchText
          in: query
          description: Text string to search for
          schema:
            type: string
        - name: sort
          in: query
          description: Name of the attribute to use for sort order
          schema:
            type: string
            enum:
              - material_id
              - code
              - name
              - description
              - sku
              - ean_upc
              - updated_at
            default: code
        - name: order
          in: query
          description: Direction of the ordering
          schema:
            type: string
            enum:
              - asc
              - desc
            default: asc
        - name: page
          in: query
          description: The page number (1-based) to retrieve the results, according to the `limit` defined
          schema:
            type: integer
            default: 1
        - name: limit
          in: query
          description: Limit to restrict the number of entries per page
          schema:
            type: integer
            default: 200
        - name: materialTypeId
          in: query
          description: Filter by material type id.
          schema:
            type: integer
        - name: s_material_type_id
          in: query
          description: Filter by material type id.
          schema:
            type: integer
        - name: materialTypeFolderId
          in: query
          description: Filter by material type folder id.
          schema:
            type: integer
        - name: s_material_type_folder_id
          in: query
          description: Filter by material type folder id.
          schema:
            type: integer
        - name: include_pending_delivery_quantity
          in: query
          description: Include pending_delivery_quantity field.
          schema:
            type: boolean
            enum:
              - true
        - name: include_stock_on_hand
          in: query
          description: Include stock_on_hand field.
          schema:
            type: boolean
            enum:
              - true
        - name: include_warehouse_minimum_stock
          in: query
          description: Include warehouse_minimum_stocks array.
          schema:
            type: boolean
            enum:
              - true
        - name: date_max_updated_at
          in: query
          description: Filter by maximum updated_at.
          schema:
            type: string
        - name: s_updated_at_before
          in: query
          description: Filter by maximum updated_at.
          schema:
            type: string
        - name: date_min_updated_at
          in: query
          description: Filter by minimum updated_at.
          schema:
            type: string
        - name: s_updated_at_after
          in: query
          description: Filter by minimum updated_at.
          schema:
            type: string
        - name: s_code
          in: query
          description: Filter by material code.
          schema:
            type: string
        - name: s_material_id_notin
          in: query
          description: Exclude materials by id. It should be separated by comma in case of multiple ids
          schema:
            type: string
          examples:
            default:
              value: s_material_id_notin=1,2,3
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      title: Material
                      description: Material model structure details
                      type: object
                      properties:
                        id:
                          description: ID of the Material
                          type: string
                          readOnly: true
                          examples:
                            - '1'
                        type:
                          description: Model type
                          type: string
                          enum:
                            - stock-material
                          readOnly: true
                          examples:
                            - stock-material
                        attributes:
                          type: object
                          properties:
                            material_id:
                              description: ID of the material
                              type: string
                              readOnly: true
                              examples:
                                - '1'
                            material_type_id:
                              description: ID of the material type
                              type: string
                              readOnly: true
                              examples:
                                - '11'
                            name:
                              description: Name of the material
                              type: string
                              examples:
                                - Chair
                            code:
                              description: Code of the material
                              type: string
                              examples:
                                - CH-00001
                            purchase_consumption_type:
                              description: Purchase consumption type of the material
                              type: string
                              enum:
                                - INHERIT
                                - AUTOMATIC
                                - MANUAL
                              examples:
                                - INHERIT
                            units:
                              description: Indicates which kind of unit should this material be measured with
                              type: string
                              examples:
                                - un
                            observations:
                              description: Material observations
                              type:
                                - string
                                - 'null'
                              examples:
                                - This is a observation
                            description:
                              description: Description of the material
                              type: string
                              examples:
                                - This is a chair
                            sku:
                              description: SKU of the material
                              type:
                                - string
                                - 'null'
                              examples:
                                - SKU-00001
                            ean_upc:
                              description: EAN/UPC of the material
                              type:
                                - string
                                - 'null'
                              examples:
                                - '1234567890123'
                            sale_price:
                              description: Sale price of the material
                              type: number
                              examples:
                                - 10
                            sale_vat:
                              description: Sale VAT of the material
                              type: number
                              examples:
                                - 23
                            created_at:
                              description: Date of creation
                              allOf:
                                - type:
                                    - string
                                    - 'null'
                                  pattern: >-
                                    ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                    ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                  examples:
                                    - '2021-07-21 18:38:00'
                              readOnly: true
                            updated_at:
                              description: Last update date
                              allOf:
                                - type:
                                    - string
                                    - 'null'
                                  pattern: >-
                                    ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                    ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                  examples:
                                    - '2021-07-21 18:38:00'
                              readOnly: true
                            warehouses_minimum_stocks:
                              type: array
                              items:
                                type: object
                                properties:
                                  warehouse_id:
                                    type: integer
                                    examples:
                                      - 1
                                  warehouse_name:
                                    type: string
                                    examples:
                                      - Warehouse
                                  minimum_quantity:
                                    type: integer
                                    examples:
                                      - 10
                      required:
                        - id
                        - type
                        - attributes
                  meta:
                    title: Meta
                    description: Meta model structure details
                    type: object
                    properties:
                      pagination:
                        type: object
                        properties:
                          total:
                            description: Total items.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          count:
                            description: Total items returned for the current page.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          per_page:
                            description: Maximum number of records per page.
                            type: integer
                            minimum: 1
                            default: 200
                            examples:
                              - 1
                          current_page:
                            description: Number of the current page.
                            type: integer
                            minimum: 1
                            default: 1
                          total_pages:
                            description: Number of the total pages.
                            type: integer
                            minimum: 1
                            default: 1
                        required:
                          - total
                          - count
                          - per_page
                          - current_page
                          - total_pages
                  links:
                    title: Response Links on listing operations
                    description: >-
                      Requests that return multiple items include a `links` attribute, with links related to request's
                      context.
                    type: object
                    properties:
                      self:
                        description: Current response link.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      first:
                        description: Link to the first page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      last:
                        description: Link to the previous page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      next:
                        description: Link to the next page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                    required:
                      - self
                      - first
                      - last
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
    post:
      operationId: createStockMaterial
      tags:
        - Materials
      summary: Create a new material
      description: This endpoint allows you to create a new material.
      requestBody:
        content:
          application/json:
            schema:
              description: Material payload
              type: object
              properties:
                name:
                  description: Name of the material
                  type: string
                  examples:
                    - Chair
                code:
                  description: Code of the material. It must be unique
                  type: string
                  examples:
                    - CH-0001
                description:
                  description: Description of the material
                  type: string
                  examples:
                    - This is a chair
                units:
                  description: What unit should this item be measured with
                  type: string
                  examples:
                    - un
                material_type_id:
                  description: Material type id
                  type: integer
                  examples:
                    - 1
                purchase_consumption_type:
                  description: Purchase consumption type of the material
                  type: string
                  enum:
                    - INHERIT
                    - AUTOMATIC
                    - MANUAL
                sku:
                  description: Material SKU
                  type: string
                  examples:
                    - SKU-00001
                ean_upc:
                  description: Material EAN
                  type: string
                  examples:
                    - '1234567890123'
                observations:
                  description: Material observations
                  type: string
                  examples:
                    - Observations
                sale_price:
                  description: This is the default sale price for the material
                  type: number
                  examples:
                    - 100
                sale_vat:
                  description: This is the default sale vat for the material
                  type: number
                  examples:
                    - 23
              required:
                - material_type_id
                - name
                - code
                - units
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: Material
                    description: Material model structure details
                    type: object
                    properties:
                      id:
                        description: ID of the Material
                        type: string
                        readOnly: true
                        examples:
                          - '1'
                      type:
                        description: Model type
                        type: string
                        enum:
                          - stock-material
                        readOnly: true
                        examples:
                          - stock-material
                      attributes:
                        type: object
                        properties:
                          material_id:
                            description: ID of the material
                            type: string
                            readOnly: true
                            examples:
                              - '1'
                          material_type_id:
                            description: ID of the material type
                            type: string
                            readOnly: true
                            examples:
                              - '11'
                          name:
                            description: Name of the material
                            type: string
                            examples:
                              - Chair
                          code:
                            description: Code of the material
                            type: string
                            examples:
                              - CH-00001
                          purchase_consumption_type:
                            description: Purchase consumption type of the material
                            type: string
                            enum:
                              - INHERIT
                              - AUTOMATIC
                              - MANUAL
                            examples:
                              - INHERIT
                          units:
                            description: Indicates which kind of unit should this material be measured with
                            type: string
                            examples:
                              - un
                          observations:
                            description: Material observations
                            type:
                              - string
                              - 'null'
                            examples:
                              - This is a observation
                          description:
                            description: Description of the material
                            type: string
                            examples:
                              - This is a chair
                          sku:
                            description: SKU of the material
                            type:
                              - string
                              - 'null'
                            examples:
                              - SKU-00001
                          ean_upc:
                            description: EAN/UPC of the material
                            type:
                              - string
                              - 'null'
                            examples:
                              - '1234567890123'
                          sale_price:
                            description: Sale price of the material
                            type: number
                            examples:
                              - 10
                          sale_vat:
                            description: Sale VAT of the material
                            type: number
                            examples:
                              - 23
                          created_at:
                            description: Date of creation
                            allOf:
                              - type:
                                  - string
                                  - 'null'
                                pattern: >-
                                  ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                  ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                examples:
                                  - '2021-07-21 18:38:00'
                            readOnly: true
                          updated_at:
                            description: Last update date
                            allOf:
                              - type:
                                  - string
                                  - 'null'
                                pattern: >-
                                  ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                  ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                examples:
                                  - '2021-07-21 18:38:00'
                            readOnly: true
                          warehouses_minimum_stocks:
                            type: array
                            items:
                              type: object
                              properties:
                                warehouse_id:
                                  type: integer
                                  examples:
                                    - 1
                                warehouse_name:
                                  type: string
                                  examples:
                                    - Warehouse
                                minimum_quantity:
                                  type: integer
                                  examples:
                                    - 10
                    required:
                      - id
                      - type
                      - attributes
              examples:
                Example:
                  value:
                    data:
                      type: stock-material
                      attributes:
                        material_id: '220132'
                        material_type_id: '1'
                        name: Chair
                        code: CH-0001
                        units: un
                        observations: This is an observation
                        description: This is a chair
                        sku: SKU-0001
                        ean_upc: '1234567890123'
                        sale_price: 0
                        sale_vat: 0
                        created_at: '2025-01-01 12:00:00'
                        updated_at: '2025-01-01 13:00:00'
                        purchase_consumption_type: INHERIT
                      id: '1234'
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /stocks/materials/{materialId}:
    get:
      operationId: getStockMaterial
      tags:
        - Materials
      summary: Get a Material
      description: This endpoint allows you to get a Material.
      parameters:
        - name: materialId
          in: path
          description: The Material ID
          required: true
          schema:
            type: string
        - name: expanded
          in: query
          description: Comma-separated list of relations to include in the response
          schema:
            type: string
            enum:
              - material_type
              - warehouse
              - supplier_custom_price
        - name: include_pending_delivery_quantity
          in: query
          description: Include pending_delivery_quantity field.
          schema:
            type: boolean
            enum:
              - true
        - name: include_stock_on_hand
          in: query
          description: Include stock_on_hand field.
          schema:
            type: boolean
            enum:
              - true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: Material
                    description: Material model structure details
                    type: object
                    properties:
                      id:
                        description: ID of the Material
                        type: string
                        readOnly: true
                        examples:
                          - '1'
                      type:
                        description: Model type
                        type: string
                        enum:
                          - stock-material
                        readOnly: true
                        examples:
                          - stock-material
                      attributes:
                        type: object
                        properties:
                          material_id:
                            description: ID of the material
                            type: string
                            readOnly: true
                            examples:
                              - '1'
                          material_type_id:
                            description: ID of the material type
                            type: string
                            readOnly: true
                            examples:
                              - '11'
                          name:
                            description: Name of the material
                            type: string
                            examples:
                              - Chair
                          code:
                            description: Code of the material
                            type: string
                            examples:
                              - CH-00001
                          purchase_consumption_type:
                            description: Purchase consumption type of the material
                            type: string
                            enum:
                              - INHERIT
                              - AUTOMATIC
                              - MANUAL
                            examples:
                              - INHERIT
                          units:
                            description: Indicates which kind of unit should this material be measured with
                            type: string
                            examples:
                              - un
                          observations:
                            description: Material observations
                            type:
                              - string
                              - 'null'
                            examples:
                              - This is a observation
                          description:
                            description: Description of the material
                            type: string
                            examples:
                              - This is a chair
                          sku:
                            description: SKU of the material
                            type:
                              - string
                              - 'null'
                            examples:
                              - SKU-00001
                          ean_upc:
                            description: EAN/UPC of the material
                            type:
                              - string
                              - 'null'
                            examples:
                              - '1234567890123'
                          sale_price:
                            description: Sale price of the material
                            type: number
                            examples:
                              - 10
                          sale_vat:
                            description: Sale VAT of the material
                            type: number
                            examples:
                              - 23
                          created_at:
                            description: Date of creation
                            allOf:
                              - type:
                                  - string
                                  - 'null'
                                pattern: >-
                                  ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                  ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                examples:
                                  - '2021-07-21 18:38:00'
                            readOnly: true
                          updated_at:
                            description: Last update date
                            allOf:
                              - type:
                                  - string
                                  - 'null'
                                pattern: >-
                                  ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                  ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                examples:
                                  - '2021-07-21 18:38:00'
                            readOnly: true
                          warehouses_minimum_stocks:
                            type: array
                            items:
                              type: object
                              properties:
                                warehouse_id:
                                  type: integer
                                  examples:
                                    - 1
                                warehouse_name:
                                  type: string
                                  examples:
                                    - Warehouse
                                minimum_quantity:
                                  type: integer
                                  examples:
                                    - 10
                    required:
                      - id
                      - type
                      - attributes
              examples:
                Example:
                  value:
                    data:
                      type: stock-material
                      attributes:
                        material_id: '220132'
                        material_type_id: '1'
                        name: Chair
                        code: CH-0001
                        units: un
                        observations: This is an observation
                        description: This is a chair
                        sku: SKU-0001
                        ean_upc: '1234567890123'
                        sale_price: 0
                        sale_vat: 0
                        created_at: '2025-01-01 12:00:00'
                        updated_at: '2025-01-01 13:00:00'
                        purchase_consumption_type: INHERIT
                      id: '1234'
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
    delete:
      operationId: deleteStockMaterial
      tags:
        - Materials
      summary: Delete a material
      description: This endpoint allows you to delete a specific material.
      parameters:
        - name: materialId
          in: path
          description: The Material ID
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items: {}
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
      x-toolbox: true
    patch:
      operationId: updateStockMaterial
      tags:
        - Materials
      summary: Update a material
      description: This endpoint allows you to update a specific material.
      parameters:
        - name: materialId
          in: path
          description: The Material ID
          required: true
          schema:
            type: string
        - name: expanded
          in: query
          description: Comma-separated list of relations to include in the response
          schema:
            type: string
            enum:
              - material_type
              - warehouse
              - supplier_custom_price
      requestBody:
        content:
          application/json:
            schema:
              description: Material payload
              type: object
              properties:
                name:
                  description: Name of the material
                  type: string
                  examples:
                    - Chair
                code:
                  description: Code of the material. It must be unique
                  type: string
                  examples:
                    - CH-0001
                description:
                  description: Description of the material
                  type:
                    - string
                    - 'null'
                  examples:
                    - This is a chair
                units:
                  description: What unit should this item be measured with
                  type: string
                  examples:
                    - un
                material_type_id:
                  description: Material type id
                  type: integer
                  examples:
                    - 1
                observations:
                  description: Material observations
                  type:
                    - string
                    - 'null'
                  examples:
                    - This is an observation
                sku:
                  description: SKU of the material
                  type:
                    - string
                    - 'null'
                  examples:
                    - SKU-00001
                ean_upc:
                  description: EAN/UPC of the material
                  type:
                    - string
                    - 'null'
                  examples:
                    - '1234567890123'
                purchase_consumption_type:
                  description: Purchase consumption type of the material
                  type: string
                  enum:
                    - INHERIT
                    - AUTOMATIC
                    - MANUAL
              required:
                - material_type_id
                - name
                - code
                - units
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: Material
                    description: Material model structure details
                    type: object
                    properties:
                      id:
                        description: ID of the Material
                        type: string
                        readOnly: true
                        examples:
                          - '1'
                      type:
                        description: Model type
                        type: string
                        enum:
                          - stock-material
                        readOnly: true
                        examples:
                          - stock-material
                      attributes:
                        type: object
                        properties:
                          material_id:
                            description: ID of the material
                            type: string
                            readOnly: true
                            examples:
                              - '1'
                          material_type_id:
                            description: ID of the material type
                            type: string
                            readOnly: true
                            examples:
                              - '11'
                          name:
                            description: Name of the material
                            type: string
                            examples:
                              - Chair
                          code:
                            description: Code of the material
                            type: string
                            examples:
                              - CH-00001
                          purchase_consumption_type:
                            description: Purchase consumption type of the material
                            type: string
                            enum:
                              - INHERIT
                              - AUTOMATIC
                              - MANUAL
                            examples:
                              - INHERIT
                          units:
                            description: Indicates which kind of unit should this material be measured with
                            type: string
                            examples:
                              - un
                          observations:
                            description: Material observations
                            type:
                              - string
                              - 'null'
                            examples:
                              - This is a observation
                          description:
                            description: Description of the material
                            type: string
                            examples:
                              - This is a chair
                          sku:
                            description: SKU of the material
                            type:
                              - string
                              - 'null'
                            examples:
                              - SKU-00001
                          ean_upc:
                            description: EAN/UPC of the material
                            type:
                              - string
                              - 'null'
                            examples:
                              - '1234567890123'
                          sale_price:
                            description: Sale price of the material
                            type: number
                            examples:
                              - 10
                          sale_vat:
                            description: Sale VAT of the material
                            type: number
                            examples:
                              - 23
                          created_at:
                            description: Date of creation
                            allOf:
                              - type:
                                  - string
                                  - 'null'
                                pattern: >-
                                  ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                  ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                examples:
                                  - '2021-07-21 18:38:00'
                            readOnly: true
                          updated_at:
                            description: Last update date
                            allOf:
                              - type:
                                  - string
                                  - 'null'
                                pattern: >-
                                  ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                  ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                examples:
                                  - '2021-07-21 18:38:00'
                            readOnly: true
                          warehouses_minimum_stocks:
                            type: array
                            items:
                              type: object
                              properties:
                                warehouse_id:
                                  type: integer
                                  examples:
                                    - 1
                                warehouse_name:
                                  type: string
                                  examples:
                                    - Warehouse
                                minimum_quantity:
                                  type: integer
                                  examples:
                                    - 10
                    required:
                      - id
                      - type
                      - attributes
              examples:
                Example:
                  value:
                    data:
                      type: stock-material
                      attributes:
                        material_id: '220132'
                        material_type_id: '1'
                        name: Chair
                        code: CH-0001
                        units: un
                        observations: This is an observation
                        description: This is a chair
                        sku: SKU-0001
                        ean_upc: '1234567890123'
                        sale_price: 0
                        sale_vat: 0
                        created_at: '2025-01-01 12:00:00'
                        updated_at: '2025-01-01 13:00:00'
                        purchase_consumption_type: INHERIT
                      id: '1234'
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /stocks/materials/{materialId}/registry:
    get:
      operationId: getStockMaterialRegistry
      tags:
        - Materials
      summary: Get the Material Registry
      description: This endpoint allows you to get the Material Registry.
      parameters:
        - name: materialId
          in: path
          description: The Material ID
          required: true
          schema:
            type: string
        - name: expanded
          in: query
          description: Comma-separated list of relations to include in the response
          required: false
          schema:
            type: string
            enum:
              - operator
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: Material Registry
                    description: Material Registry model structure details
                    type: object
                    properties:
                      id:
                        description: ID of the material registry
                        type: string
                        examples:
                          - '1'
                        readOnly: true
                      type:
                        description: Model type
                        type: string
                        enum:
                          - stock-material-registry
                        examples:
                          - stock-material-registry
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          material_registry_id:
                            description: ID of the material registry
                            type: integer
                            examples:
                              - 1
                            readOnly: true
                          material_id:
                            description: ID of the material
                            type: integer
                            examples:
                              - 1
                            readOnly: true
                          operator_id:
                            description: ID of the operator
                            type: integer
                            examples:
                              - 1
                          action:
                            description: Action of the operation
                            type: string
                            enum:
                              - CREATED
                              - UPDATED
                              - DELETED
                            examples:
                              - CREATED
                          field:
                            description: The field we changed the value
                            type: string
                            enum:
                              - CODE
                              - NAME
                              - OBSERVATIONS
                              - DESCRIPTION
                              - SKU
                              - EAN_UPC
                              - UNITS
                              - SALE_PRICE
                              - SALE_VAT
                              - MATERIAL_TYPE
                              - PURCHASE_CONSUMPTION_TYPE
                            examples:
                              - CODE
                          from:
                            description: The warehouse id material was transfered from
                            type: string
                            examples:
                              - '1'
                          to:
                            description: The warehouse id material was transfered to
                            type: string
                            examples:
                              - '2'
                          aux_id:
                            description: Field auxiliary ID, for example, the associated material type id
                            type: string
                            examples:
                              - '12'
                          created_at:
                            description: Date of creation
                            type: string
                            format: date-time
                            examples:
                              - '2021-01-01 00:00:00'
              examples:
                Example:
                  value:
                    data:
                      type: stock-material-registry
                      attributes:
                        material_registry_id: '1234'
                        material_id: '12345'
                        operator_id: '1'
                        action: CREATED
                        created_at: '2025-01-01 12:00:00'
                      id: '1234'
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /stocks/materials/{materialId}/stock-transactions:
    post:
      operationId: createMaterialStockBatchTransactions
      tags:
        - Materials
      summary: Create a batch of stock transactions for a material
      description: This endpoint allows you to create multiple stock transactions for a specific material.
      parameters:
        - name: materialId
          in: path
          description: The Material ID
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              description: Material Stock Batch Transactions payload
              type: object
              properties:
                action:
                  description: Action to be performed
                  type: string
                  enum:
                    - MATERIAL_ADD
                    - MATERIAL_SUBTRACT
                  examples:
                    - MATERIAL_ADD
                observations:
                  description: Observations about the transaction
                  type: string
                  examples:
                    - Observations about the transaction
                transactions:
                  description: List of transactions
                  type: array
                  items:
                    type: object
                    properties:
                      quantity:
                        description: Quantity of the transaction
                        type: number
                        examples:
                          - 10
                      warehouse_id:
                        description: Warehouse ID
                        type: integer
                        examples:
                          - 1
                      cost_price:
                        description: Cost price of the transaction
                        type: number
                        examples:
                          - 10
                      observations:
                        description: Observations about the transaction
                        type: string
                        examples:
                          - Observations about the transaction
                    required:
                      - quantity
                      - warehouse_id
              required:
                - action
                - transactions
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: StockBatchTransactions
                    description: StockBatchTransactions model structure details
                    type: object
                    properties:
                      id:
                        description: ID of the batch
                        type: string
                        readOnly: true
                      type:
                        description: Model type
                        type: string
                        enum:
                          - stock-transactions-batch
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          stock_transaction_batch_id:
                            description: ID of the stock transaction batch
                            type: string
                            examples:
                              - fd9815f9-d365-4be8-bb3a-3ab66a595c61
                            readOnly: true
                          operator_id:
                            description: ID of the operator
                            type: integer
                            examples:
                              - 1
                            readOnly: true
                          action:
                            description: Batch's action
                            type: string
                            enum:
                              - TRANSFER_STOCK
                              - WAREHOUSE_SUBTRACT
                              - WAREHOUSE_ADD
                              - MATERIAL_SUBTRACT
                              - MATERIAL_ADD
                              - CONSUME
                              - PURCHASE
                            examples:
                              - TRANSFER_STOCK
                            readOnly: true
                          observations:
                            description: Batch's observations
                            type:
                              - string
                              - 'null'
                          source_id:
                            description: ID of the source
                            type: integer
                            examples:
                              - 1
                            readOnly: true
                          source_type:
                            description: Type of the source
                            type: string
                            enum:
                              - FAILURE
                              - SCHEDULED_WORK_ORDER
                              - BUY_ORDER
                              - ELEMENT
                              - MANUEL
                            readOnly: true
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /stocks/materials/export:
    get:
      operationId: getStockMaterialExport
      tags:
        - Materials
      summary: Export Materials
      description: This endpoints allows you to export your materials into a xlsx file
      parameters:
        - name: filter[warehouse_ids]
          in: query
          description: Warehouse ID you want to filter materials. It should be separated by comma in case of multiple warehouses
          schema:
            type: string
          examples:
            default:
              value: filter[warehouse_ids]=1,2,3
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items: {}
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /stocks/stock-status:
    get:
      operationId: getStockStatus
      tags:
        - Stocks
      summary: List all Stock Status
      description: >
        This endpoint allows you to list all Stock Status. A stock status corresponds to an existing stock in a
        warehouse for a material.
      parameters:
        - name: s_warehouse_id
          in: query
          description: Filter by warehouse id
          required: false
          schema:
            type: string
        - name: s_material_id
          in: query
          description: Filter by material id
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      title: StockStatus
                      description: StockStatus model structure details
                      type: object
                      properties:
                        id:
                          description: ID of the StockStatus
                          type: string
                          readOnly: true
                        type:
                          description: Model type
                          type: string
                          enum:
                            - stock-status
                          readOnly: true
                        attributes:
                          type: object
                          properties:
                            material_id:
                              description: ID of the Material
                              type: integer
                              examples:
                                - 1
                              readOnly: true
                            warehouse_id:
                              description: ID of the Warehouse
                              type: integer
                              examples:
                                - 1
                              readOnly: true
                            quantity:
                              description: Quantity of the material present in the warehouse
                              type: number
                              readOnly: true
                            mean_price:
                              description: Mean price of the material associated with the warehouse
                              type:
                                - number
                                - 'null'
                              readOnly: true
                            observations:
                              description: Description or notes
                              type:
                                - string
                                - 'null'
                              readOnly: true
                      required:
                        - id
                        - type
                        - attributes
                  included:
                    description: List of relationships to be included
                    type: array
                    items:
                      type: object
                    uniqueItems: true
                  meta:
                    title: Meta
                    description: Meta model structure details
                    type: object
                    properties:
                      pagination:
                        type: object
                        properties:
                          total:
                            description: Total items.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          count:
                            description: Total items returned for the current page.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          per_page:
                            description: Maximum number of records per page.
                            type: integer
                            minimum: 1
                            default: 200
                            examples:
                              - 1
                          current_page:
                            description: Number of the current page.
                            type: integer
                            minimum: 1
                            default: 1
                          total_pages:
                            description: Number of the total pages.
                            type: integer
                            minimum: 1
                            default: 1
                        required:
                          - total
                          - count
                          - per_page
                          - current_page
                          - total_pages
                  links:
                    title: Response Links on listing operations
                    description: >-
                      Requests that return multiple items include a `links` attribute, with links related to request's
                      context.
                    type: object
                    properties:
                      self:
                        description: Current response link.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      first:
                        description: Link to the first page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      last:
                        description: Link to the previous page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      next:
                        description: Link to the next page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                    required:
                      - self
                      - first
                      - last
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /stocks/stock-status/{stockStatus}:
    patch:
      operationId: updateStockStatus
      tags:
        - Stocks
      summary: Update a Stock Status
      description: >
        This endpoint allows you to update a Stock Status. A stock status corresponds to an existing stock in a
        warehouse for a material.
      parameters:
        - name: stockStatus
          in: path
          description: The stock status ID
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              description: Stock status update payload
              type: object
              properties:
                minimum_quantity:
                  description: Minimum quantity
                  type: integer
                  examples:
                    - 10
                mean_price:
                  description: Mean price
                  type: number
                  examples:
                    - 10.5
                observations:
                  description: Observations about the stock status update
                  type: string
                  examples:
                    - Stock status updated to in stock
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: StockStatus
                    description: StockStatus model structure details
                    type: object
                    properties:
                      id:
                        description: ID of the StockStatus
                        type: string
                        readOnly: true
                      type:
                        description: Model type
                        type: string
                        enum:
                          - stock-status
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          material_id:
                            description: ID of the Material
                            type: integer
                            examples:
                              - 1
                            readOnly: true
                          warehouse_id:
                            description: ID of the Warehouse
                            type: integer
                            examples:
                              - 1
                            readOnly: true
                          quantity:
                            description: Quantity of the material present in the warehouse
                            type: number
                            readOnly: true
                          mean_price:
                            description: Mean price of the material associated with the warehouse
                            type:
                              - number
                              - 'null'
                            readOnly: true
                          observations:
                            description: Description or notes
                            type:
                              - string
                              - 'null'
                            readOnly: true
                    required:
                      - id
                      - type
                      - attributes
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
    delete:
      operationId: deleteStockStatus
      tags:
        - Stocks
      summary: Delete a Stock Status
      description: >
        This endpoint allows you to delete a Stock Status. A stock status corresponds to an existing stock in a
        warehouse for a material.
      parameters:
        - name: stockStatus
          in: path
          description: The stock status ID
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items: {}
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /stocks/stock-transactions:
    get:
      operationId: getAllStockTransactions
      tags:
        - Stock Transactions
      summary: List all the stock transactions
      description: This endpoint allows you to list all the stock transactions.
      parameters:
        - name: sort
          in: query
          description: he name of the attribute to use for sort order
          required: false
          schema:
            type: string
            default: stock_id
        - name: order
          in: query
          description: The direction of the sort order
          required: false
          schema:
            type: string
            enum:
              - asc
              - desc
            default: asc
        - name: page
          in: query
          description: The page number (1-based) to retrieve the results, according to the `limit` defined
          required: false
          schema:
            type: integer
            default: 1
        - name: limit
          in: query
          description: Limit to restrict the number of entries per page
          required: false
          schema:
            type: integer
            default: 200
        - name: warehouse_id
          in: query
          description: Filter by warehouse id
          required: false
          schema:
            type: string
        - name: material_id
          in: query
          description: Filter by material id
          required: false
          schema:
            type: string
        - name: expand
          in: query
          description: Comma-separated list of relations to include in the response
          required: false
          schema:
            type: string
            enum:
              - operator
        - name: s_warehouse_id
          in: query
          description: Filter by warehouse id
          required: false
          schema:
            type: string
        - name: s_material_id
          in: query
          description: Filter by material id
          required: false
          schema:
            type: string
        - name: date_min_created_at
          in: query
          description: Filter by minimum created_at.
          required: false
          schema:
            type: string
        - name: date_max_created_at
          in: query
          description: Filter by maximum created_at.
          required: false
          schema:
            type: string
        - name: date_min_updated_at
          in: query
          description: Filter by minimum updated_at.
          required: false
          schema:
            type: string
        - name: date_max_updated_at
          in: query
          description: Filter by maximum updated_at.
          required: false
          schema:
            type: string
        - name: s_operator_id
          in: query
          description: Filter by operator id
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: StockTransaction
                    description: StockTransaction model structure details
                    type: object
                    properties:
                      id:
                        description: ID of the transaction
                        type: string
                        readOnly: true
                      type:
                        description: Model type
                        type: string
                        enum:
                          - stock-transaction
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          warehouse_id:
                            description: ID of the warehouse
                            type: integer
                            examples:
                              - 1
                          material_id:
                            description: ID of the material
                            type: integer
                            examples:
                              - 1
                          quantity:
                            description: Transaction's quantity
                            type: integer
                            examples:
                              - 25
                          action:
                            description: Transaction's action
                            type: string
                            enum:
                              - ADD
                              - SUBTRACT
                            examples:
                              - SUBTRACT
                          observations:
                            description: Transaction's observations
                            type:
                              - string
                              - 'null'
                          cost_price:
                            description: Transaction's associated price
                            type: integer
                            examples:
                              - 25
                          created_at:
                            description: Transaction's created date
                            type: string
                            examples:
                              - '2024-08-16T13:33:39.000000Z'
                          operator_id:
                            description: ID of the operator
                            type: integer
                            examples:
                              - 1
                          stock_transaction_batch_id:
                            description: ID of the parent transaction batch
                            type: integer
                            readOnly: true
                            examples:
                              - 1
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /stocks/stock-transactions/transfer:
    post:
      operationId: stockTransactionsTransfer
      tags:
        - Stock Transactions
      summary: Transfer stock between warehouses
      description: This endpoint allows you to transfer stock between warehouses.
      requestBody:
        content:
          application/json:
            schema:
              description: Transfer stock between warehouses payload
              type: object
              properties:
                warehouse_from_id:
                  description: Warehouse id to transfer stock from
                  type: integer
                  examples:
                    - 1
                warehouse_to_id:
                  description: Warehouse id to transfer stock to
                  type: integer
                  examples:
                    - 2
                material_id:
                  description: Material id to transfer
                  type: integer
                  examples:
                    - 1
                quantity:
                  description: Quantity to transfer
                  type: integer
                  examples:
                    - 10
                observations:
                  description: Observations about the transfer
                  type: string
                  examples:
                    - Transferring stock between warehouses
              required:
                - warehouse_from_id
                - warehouse_to_id
                - material_id
                - quantity
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: StockBatchTransactions
                    description: StockBatchTransactions model structure details
                    type: object
                    properties:
                      id:
                        description: ID of the batch
                        type: string
                        readOnly: true
                      type:
                        description: Model type
                        type: string
                        enum:
                          - stock-transactions-batch
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          stock_transaction_batch_id:
                            description: ID of the stock transaction batch
                            type: string
                            examples:
                              - fd9815f9-d365-4be8-bb3a-3ab66a595c61
                            readOnly: true
                          operator_id:
                            description: ID of the operator
                            type: integer
                            examples:
                              - 1
                            readOnly: true
                          action:
                            description: Batch's action
                            type: string
                            enum:
                              - TRANSFER_STOCK
                              - WAREHOUSE_SUBTRACT
                              - WAREHOUSE_ADD
                              - MATERIAL_SUBTRACT
                              - MATERIAL_ADD
                              - CONSUME
                              - PURCHASE
                            examples:
                              - TRANSFER_STOCK
                            readOnly: true
                          observations:
                            description: Batch's observations
                            type:
                              - string
                              - 'null'
                          source_id:
                            description: ID of the source
                            type: integer
                            examples:
                              - 1
                            readOnly: true
                          source_type:
                            description: Type of the source
                            type: string
                            enum:
                              - FAILURE
                              - SCHEDULED_WORK_ORDER
                              - BUY_ORDER
                              - ELEMENT
                              - MANUEL
                            readOnly: true
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /stocks/stock-transactions/transfer-all:
    post:
      operationId: stockTransactionsTransferAll
      tags:
        - Stock Transactions
      summary: Transfer all stock between warehouses
      description: This endpoint allows you to transfer all stock between warehouses.
      requestBody:
        content:
          application/json:
            schema:
              description: Transfer all stock between warehouses payload
              type: object
              properties:
                warehouse_from_id:
                  description: Warehouse id to transfer stock from
                  type: integer
                  examples:
                    - 1
                warehouse_to_id:
                  description: Warehouse id to transfer stock to
                  type: integer
                  examples:
                    - 2
                observations:
                  description: Observations about the transfer
                  type: string
                  examples:
                    - Transferring stock between warehouses
              required:
                - warehouse_from_id
                - warehouse_to_id
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: StockBatchTransactions
                    description: StockBatchTransactions model structure details
                    type: object
                    properties:
                      id:
                        description: ID of the batch
                        type: string
                        readOnly: true
                      type:
                        description: Model type
                        type: string
                        enum:
                          - stock-transactions-batch
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          stock_transaction_batch_id:
                            description: ID of the stock transaction batch
                            type: string
                            examples:
                              - fd9815f9-d365-4be8-bb3a-3ab66a595c61
                            readOnly: true
                          operator_id:
                            description: ID of the operator
                            type: integer
                            examples:
                              - 1
                            readOnly: true
                          action:
                            description: Batch's action
                            type: string
                            enum:
                              - TRANSFER_STOCK
                              - WAREHOUSE_SUBTRACT
                              - WAREHOUSE_ADD
                              - MATERIAL_SUBTRACT
                              - MATERIAL_ADD
                              - CONSUME
                              - PURCHASE
                            examples:
                              - TRANSFER_STOCK
                            readOnly: true
                          observations:
                            description: Batch's observations
                            type:
                              - string
                              - 'null'
                          source_id:
                            description: ID of the source
                            type: integer
                            examples:
                              - 1
                            readOnly: true
                          source_type:
                            description: Type of the source
                            type: string
                            enum:
                              - FAILURE
                              - SCHEDULED_WORK_ORDER
                              - BUY_ORDER
                              - ELEMENT
                              - MANUEL
                            readOnly: true
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /stocks/stock-transactions-batches:
    get:
      operationId: getAllStockTransactionBatches
      tags:
        - Stock Transactions
      summary: List all the stock transactions batches
      description: This endpoint allows you to list all the stock transactions batches.
      parameters:
        - name: s_source_type
          in: query
          description: Filter by source type.
          required: false
          schema:
            type: string
        - name: s_warehouse_id
          in: query
          description: Filter by warehouse id
          required: false
          schema:
            type: string
        - name: expanded
          in: query
          description: Comma-separated list of relations to include in the response
          schema:
            type: string
            enum:
              - stock_transactions
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: StockBatchTransactions
                    description: StockBatchTransactions model structure details
                    type: object
                    properties:
                      id:
                        description: ID of the batch
                        type: string
                        readOnly: true
                      type:
                        description: Model type
                        type: string
                        enum:
                          - stock-transactions-batch
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          stock_transaction_batch_id:
                            description: ID of the stock transaction batch
                            type: string
                            examples:
                              - fd9815f9-d365-4be8-bb3a-3ab66a595c61
                            readOnly: true
                          operator_id:
                            description: ID of the operator
                            type: integer
                            examples:
                              - 1
                            readOnly: true
                          action:
                            description: Batch's action
                            type: string
                            enum:
                              - TRANSFER_STOCK
                              - WAREHOUSE_SUBTRACT
                              - WAREHOUSE_ADD
                              - MATERIAL_SUBTRACT
                              - MATERIAL_ADD
                              - CONSUME
                              - PURCHASE
                            examples:
                              - TRANSFER_STOCK
                            readOnly: true
                          observations:
                            description: Batch's observations
                            type:
                              - string
                              - 'null'
                          source_id:
                            description: ID of the source
                            type: integer
                            examples:
                              - 1
                            readOnly: true
                          source_type:
                            description: Type of the source
                            type: string
                            enum:
                              - FAILURE
                              - SCHEDULED_WORK_ORDER
                              - BUY_ORDER
                              - ELEMENT
                              - MANUEL
                            readOnly: true
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /stocks/warehouses:
    get:
      operationId: getStockWarehouses
      tags:
        - Warehouses
      summary: List all warehouses
      description: This endpoint allows you to get all Warehouses.
      parameters:
        - name: expand
          in: query
          description: A comma-separated list of related resources to include in the response data.
          required: false
          schema:
            type: string
            enum:
              - operators
        - name: sort
          in: query
          description: The field by which the warehouse results will be sorted.
          required: false
          schema:
            type: string
            enum:
              - code
              - name
              - address
              - warehouse_id
            default: code
        - name: order
          in: query
          description: The sorting direction to apply to the results.
          required: false
          schema:
            type: string
            enum:
              - asc
              - desc
            default: asc
        - name: searchText
          in: query
          description: >-
            A general search term to filter warehouses. Enter keywords to search across warehouse code, name, and
            address. This parameter performs a partial match (using 'LIKE' internally) on these fields.
          required: false
          schema:
            type: string
            examples:
              - house
        - name: date_min_updated_at
          in: query
          description: Filter warehouses to include only those updated on or after the specified date and time.
          required: false
          schema:
            type: string
            examples:
              - '2025-05-27T10:00:00.000Z'
        - name: date_max_updated_at
          in: query
          description: Filter warehouses to include only those updated on or before the specified date and time.
          required: false
          schema:
            type: string
            examples:
              - '2025-05-27T10:00:00.000Z'
        - name: date_min_created_at
          in: query
          description: Filter warehouses to include only those created on or after the specified date and time.
          required: false
          schema:
            type: string
            examples:
              - '2025-05-27T10:00:00.000Z'
        - name: date_max_created_at
          in: query
          description: Filter warehouses to include only those created on or before the specified date and time.
          required: false
          schema:
            type: string
            examples:
              - '2025-05-27T10:00:00.000Z'
        - name: s_code
          in: query
          description: >-
            Search term to filter warehouses by their unique code. This parameter performs a partial match (using 'LIKE'
            internally) on the warehouse code.
          required: false
          schema:
            type: string
            examples:
              - WZ1
        - name: s_name
          in: query
          description: >-
            Search term to filter warehouses by their descriptive name. This parameter performs a partial match (using
            'LIKE' internally) on the warehouse name.
          required: false
          schema:
            type: string
            examples:
              - Warehouse
        - name: warehouse_managers_ids
          in: query
          description: >-
            Filter warehouses by the IDs of their associated managers. Only warehouses that have at least one manager
            with an ID present in this list will be returned.
          required: false
          schema:
            type: array
            items:
              type: integer
              examples:
                - 1
        - name: s_material_id
          in: query
          description: Filter warehouses to include only those that have ever stocked or currently hold the specified material ID.
          required: false
          schema:
            type: string
            examples:
              - '1'
        - name: limit
          in: query
          description: >-
            The maximum number of records to return in a single response page. This parameter controls the size of the
            result set for pagination.
          required: false
          schema:
            type: integer
            default: 200
        - name: page
          in: query
          description: The specific page number of the results to retrieve.
          required: false
          schema:
            type: integer
            default: 1
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      title: Warehouse
                      description: Detailed structure of a warehouse model.
                      type: object
                      properties:
                        id:
                          description: >-
                            The unique identifier of the warehouse within the system. This ID is immutable and assigned
                            upon creation.
                          type: string
                          examples:
                            - '1'
                          readOnly: true
                        type:
                          description: The resource type, identifying this as a warehouse.
                          type: string
                          enum:
                            - stock-warehouse
                          readOnly: true
                        attributes:
                          type: object
                          properties:
                            warehouse_id:
                              description: >-
                                The unique identifier of the warehouse within the system. This ID is immutable and
                                assigned upon creation.
                              type: string
                              examples:
                                - '1'
                            name:
                              description: >-
                                The descriptive name of the warehouse, intended for readability and identification
                                within the application's user interface.
                              type: string
                              examples:
                                - Warehouse
                            code:
                              description: >-
                                A unique code assigned to the warehouse, intended for readability and identification
                                within the application's user interface.
                              type: string
                              examples:
                                - WZ1
                            address:
                              description: >-
                                The physical street address of the warehouse. This provides the geographical location of
                                the storage facility.
                              type:
                                - string
                                - 'null'
                              examples:
                                - Warehouse street, 10, Country
                            observations:
                              description: >-
                                Free-text field for any additional notes, specific instructions, or relevant details
                                pertaining to this warehouse.
                              type:
                                - string
                                - 'null'
                              examples:
                                - Operational hours from 9am to 7pm, entrance by the large door on the side.
                            created_at:
                              description: >-
                                The timestamp indicating when the warehouse record was initially created in the system.
                                This value is automatically set upon the creation of a new warehouse.
                              type: string
                              format: date-time
                              examples:
                                - '2025-05-27T11:44:46.000Z'
                            updated_at:
                              description: >-
                                The timestamp indicating when the warehouse record was last modified. This value is
                                automatically updated whenever any attribute of the warehouse is changed and saved.
                              type: string
                              format: date-time
                              examples:
                                - '2025-05-27T11:44:46.000Z'
                            associated_operators:
                              description: >-
                                A list of operators associated with this warehouse. This defines the personnel linked to
                                this storage location and their respective roles or responsibilities.
                              type: array
                              items:
                                title: AssociatedOperator
                                description: >-
                                  Details of an operator associated with a warehouse, defining their specific role or
                                  permissions.
                                type: object
                                properties:
                                  operator_id:
                                    description: >-
                                      The unique identifier of the operator within the system. This ID is used to
                                      reference the specific personnel associated with the warehouse.
                                    type: integer
                                    examples:
                                      - 1
                                  permission:
                                    description: >-
                                      The specific permission or role assigned to this operator in relation to the
                                      warehouse. This dictates the actions the operator is authorized to perform.
                                    type: string
                                    enum:
                                      - manager
                  included:
                    description: List of relationships to be included
                    type: array
                    items:
                      type: object
                    uniqueItems: true
                  meta:
                    title: Meta
                    description: Meta model structure details
                    type: object
                    properties:
                      pagination:
                        type: object
                        properties:
                          total:
                            description: Total items.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          count:
                            description: Total items returned for the current page.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          per_page:
                            description: Maximum number of records per page.
                            type: integer
                            minimum: 1
                            default: 200
                            examples:
                              - 1
                          current_page:
                            description: Number of the current page.
                            type: integer
                            minimum: 1
                            default: 1
                          total_pages:
                            description: Number of the total pages.
                            type: integer
                            minimum: 1
                            default: 1
                        required:
                          - total
                          - count
                          - per_page
                          - current_page
                          - total_pages
                  links:
                    title: Response Links on listing operations
                    description: >-
                      Requests that return multiple items include a `links` attribute, with links related to request's
                      context.
                    type: object
                    properties:
                      self:
                        description: Current response link.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      first:
                        description: Link to the first page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      last:
                        description: Link to the previous page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      next:
                        description: Link to the next page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                    required:
                      - self
                      - first
                      - last
              examples:
                Example:
                  value:
                    data:
                      - type: stock-warehouse
                        id: '18'
                        attributes:
                          warehouse_id: '18'
                          name: Armazém AVAC - Geral
                          code: GERAL
                          observations: abc
                          address: Rua da Constituição, 346
                          associated_operators:
                            - operator_id: 1
                              permission: manager
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
    post:
      operationId: createStockWarehouses
      tags:
        - Warehouses
      summary: Create a warehouse
      description: This endpoint allows you to create a warehouse.
      requestBody:
        content:
          application/json:
            schema:
              description: Create Warehouse payload
              type: object
              properties:
                code:
                  description: Code of the warehouse.
                  type: string
                name:
                  description: Name of the warehouse.
                  type: string
                associated_operators:
                  description: List of associated operators.
                  type: array
                  items:
                    type: object
                    properties:
                      operator_id:
                        description: ID of the operator.
                        type: integer
                      permission:
                        description: Permission of the operator.
                        type: string
                        enum:
                          - manager
                    required:
                      - operator_id
                      - permission
              required:
                - code
                - name
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      title: Warehouse
                      description: Detailed structure of a warehouse model.
                      type: object
                      properties:
                        id:
                          description: >-
                            The unique identifier of the warehouse within the system. This ID is immutable and assigned
                            upon creation.
                          type: string
                          examples:
                            - '1'
                          readOnly: true
                        type:
                          description: The resource type, identifying this as a warehouse.
                          type: string
                          enum:
                            - stock-warehouse
                          readOnly: true
                        attributes:
                          type: object
                          properties:
                            warehouse_id:
                              description: >-
                                The unique identifier of the warehouse within the system. This ID is immutable and
                                assigned upon creation.
                              type: string
                              examples:
                                - '1'
                            name:
                              description: >-
                                The descriptive name of the warehouse, intended for readability and identification
                                within the application's user interface.
                              type: string
                              examples:
                                - Warehouse
                            code:
                              description: >-
                                A unique code assigned to the warehouse, intended for readability and identification
                                within the application's user interface.
                              type: string
                              examples:
                                - WZ1
                            address:
                              description: >-
                                The physical street address of the warehouse. This provides the geographical location of
                                the storage facility.
                              type:
                                - string
                                - 'null'
                              examples:
                                - Warehouse street, 10, Country
                            observations:
                              description: >-
                                Free-text field for any additional notes, specific instructions, or relevant details
                                pertaining to this warehouse.
                              type:
                                - string
                                - 'null'
                              examples:
                                - Operational hours from 9am to 7pm, entrance by the large door on the side.
                            created_at:
                              description: >-
                                The timestamp indicating when the warehouse record was initially created in the system.
                                This value is automatically set upon the creation of a new warehouse.
                              type: string
                              format: date-time
                              examples:
                                - '2025-05-27T11:44:46.000Z'
                            updated_at:
                              description: >-
                                The timestamp indicating when the warehouse record was last modified. This value is
                                automatically updated whenever any attribute of the warehouse is changed and saved.
                              type: string
                              format: date-time
                              examples:
                                - '2025-05-27T11:44:46.000Z'
                            associated_operators:
                              description: >-
                                A list of operators associated with this warehouse. This defines the personnel linked to
                                this storage location and their respective roles or responsibilities.
                              type: array
                              items:
                                title: AssociatedOperator
                                description: >-
                                  Details of an operator associated with a warehouse, defining their specific role or
                                  permissions.
                                type: object
                                properties:
                                  operator_id:
                                    description: >-
                                      The unique identifier of the operator within the system. This ID is used to
                                      reference the specific personnel associated with the warehouse.
                                    type: integer
                                    examples:
                                      - 1
                                  permission:
                                    description: >-
                                      The specific permission or role assigned to this operator in relation to the
                                      warehouse. This dictates the actions the operator is authorized to perform.
                                    type: string
                                    enum:
                                      - manager
                  included:
                    description: List of relationships to be included
                    type: array
                    items:
                      type: object
                    uniqueItems: true
                  meta:
                    title: Meta
                    description: Meta model structure details
                    type: object
                    properties:
                      pagination:
                        type: object
                        properties:
                          total:
                            description: Total items.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          count:
                            description: Total items returned for the current page.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          per_page:
                            description: Maximum number of records per page.
                            type: integer
                            minimum: 1
                            default: 200
                            examples:
                              - 1
                          current_page:
                            description: Number of the current page.
                            type: integer
                            minimum: 1
                            default: 1
                          total_pages:
                            description: Number of the total pages.
                            type: integer
                            minimum: 1
                            default: 1
                        required:
                          - total
                          - count
                          - per_page
                          - current_page
                          - total_pages
                  links:
                    title: Response Links on listing operations
                    description: >-
                      Requests that return multiple items include a `links` attribute, with links related to request's
                      context.
                    type: object
                    properties:
                      self:
                        description: Current response link.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      first:
                        description: Link to the first page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      last:
                        description: Link to the previous page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      next:
                        description: Link to the next page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                    required:
                      - self
                      - first
                      - last
              examples:
                Example:
                  value:
                    data:
                      - type: stock-warehouse
                        id: '18'
                        attributes:
                          warehouse_id: '18'
                          name: Armazém AVAC - Geral
                          code: GERAL
                          observations: abc
                          address: Rua da Constituição, 346
                          associated_operators:
                            - operator_id: 1
                              permission: manager
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /stocks/warehouses/{warehouseId}:
    get:
      operationId: getStockWarehouse
      tags:
        - Warehouses
      summary: Get a warehouse
      description: This endpoint allows you to get a specific Warehouse.
      parameters:
        - name: warehouseId
          in: path
          description: The unique identifier of the warehouse within the system. This ID is immutable and assigned upon creation.
          required: true
          schema:
            type: string
            examples:
              - '1'
        - name: expand
          in: query
          description: A comma-separated list of related resources to include in the response data.
          required: false
          schema:
            type: string
            enum:
              - operators
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: Warehouse
                    description: Detailed structure of a warehouse model.
                    type: object
                    properties:
                      id:
                        description: >-
                          The unique identifier of the warehouse within the system. This ID is immutable and assigned
                          upon creation.
                        type: string
                        examples:
                          - '1'
                        readOnly: true
                      type:
                        description: The resource type, identifying this as a warehouse.
                        type: string
                        enum:
                          - stock-warehouse
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          warehouse_id:
                            description: >-
                              The unique identifier of the warehouse within the system. This ID is immutable and
                              assigned upon creation.
                            type: string
                            examples:
                              - '1'
                          name:
                            description: >-
                              The descriptive name of the warehouse, intended for readability and identification within
                              the application's user interface.
                            type: string
                            examples:
                              - Warehouse
                          code:
                            description: >-
                              A unique code assigned to the warehouse, intended for readability and identification
                              within the application's user interface.
                            type: string
                            examples:
                              - WZ1
                          address:
                            description: >-
                              The physical street address of the warehouse. This provides the geographical location of
                              the storage facility.
                            type:
                              - string
                              - 'null'
                            examples:
                              - Warehouse street, 10, Country
                          observations:
                            description: >-
                              Free-text field for any additional notes, specific instructions, or relevant details
                              pertaining to this warehouse.
                            type:
                              - string
                              - 'null'
                            examples:
                              - Operational hours from 9am to 7pm, entrance by the large door on the side.
                          created_at:
                            description: >-
                              The timestamp indicating when the warehouse record was initially created in the system.
                              This value is automatically set upon the creation of a new warehouse.
                            type: string
                            format: date-time
                            examples:
                              - '2025-05-27T11:44:46.000Z'
                          updated_at:
                            description: >-
                              The timestamp indicating when the warehouse record was last modified. This value is
                              automatically updated whenever any attribute of the warehouse is changed and saved.
                            type: string
                            format: date-time
                            examples:
                              - '2025-05-27T11:44:46.000Z'
                          associated_operators:
                            description: >-
                              A list of operators associated with this warehouse. This defines the personnel linked to
                              this storage location and their respective roles or responsibilities.
                            type: array
                            items:
                              title: AssociatedOperator
                              description: >-
                                Details of an operator associated with a warehouse, defining their specific role or
                                permissions.
                              type: object
                              properties:
                                operator_id:
                                  description: >-
                                    The unique identifier of the operator within the system. This ID is used to
                                    reference the specific personnel associated with the warehouse.
                                  type: integer
                                  examples:
                                    - 1
                                permission:
                                  description: >-
                                    The specific permission or role assigned to this operator in relation to the
                                    warehouse. This dictates the actions the operator is authorized to perform.
                                  type: string
                                  enum:
                                    - manager
              examples:
                Example:
                  value:
                    data:
                      type: stock-warehouse
                      id: '18'
                      attributes:
                        warehouse_id: '18'
                        name: Armazém AVAC - Geral
                        code: GERAL
                        observations: abc
                        address: Rua da Constituição, 346
                        associated_operators:
                          - operator_id: 1
                            permission: manager
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
    delete:
      operationId: deleteStockWarehouse
      tags:
        - Warehouses
      summary: Delete a warehouse
      description: >-
        Deletes a specific Warehouse and its associated stock. Before deleting, ensure any related operators and ongoing
        purchases are handled using the 'associations' parameter. If 'associations' is not provided and the warehouse
        has linked operators or purchases, the deletion will fail to prevent data loss. **Important:** To avoid deleting
        the stock, you must transfer it to another warehouse before deleting this one.
      parameters:
        - name: warehouseId
          in: path
          description: The unique identifier of the warehouse within the system. This ID is immutable and assigned upon creation.
          required: true
          schema:
            type: string
            examples:
              - '1'
        - name: associations
          in: query
          description: A comma-separated list of dependencies (related resources).
          required: false
          schema:
            type: string
            enum:
              - operators
              - purchases
        - name: destinationWarehouseId
          in: query
          description: >-
            The ID of the target warehouse to which associated resources (operators or purchases) should be moved when
            deleting the current warehouse.
          required: false
          schema:
            type: integer
            examples:
              - 1
      responses:
        '204':
          description: No content
        '400':
          description: >-
            The request to delete the warehouse could not be fulfilled due to existing dependencies that prevent
            deletion without specific handling.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                      more_info:
                        type: string
              examples:
                hasOngoingPurchases:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: Warehouse has ongoing purchases
                hasDefaultOperators:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: Warehouse has operators with this predefined warehouse
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
    patch:
      operationId: updateStockWarehouse
      tags:
        - Warehouses
      summary: Update a warehouse
      description: This endpoint allows you to update a specific Warehouse.
      parameters:
        - name: warehouseId
          in: path
          description: The unique identifier of the warehouse within the system. This ID is immutable and assigned upon creation.
          required: true
          schema:
            type: string
            examples:
              - '1'
      requestBody:
        content:
          application/json:
            schema:
              description: Update Warehouse payload
              type: object
              properties:
                code:
                  description: Code of the warehouse.
                  type: string
                name:
                  description: Name of the warehouse.
                  type: string
                address:
                  description: Address of the warehouse.
                  type: string
                observations:
                  description: Observations of the warehouse.
                  type: string
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: Warehouse
                    description: Detailed structure of a warehouse model.
                    type: object
                    properties:
                      id:
                        description: >-
                          The unique identifier of the warehouse within the system. This ID is immutable and assigned
                          upon creation.
                        type: string
                        examples:
                          - '1'
                        readOnly: true
                      type:
                        description: The resource type, identifying this as a warehouse.
                        type: string
                        enum:
                          - stock-warehouse
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          warehouse_id:
                            description: >-
                              The unique identifier of the warehouse within the system. This ID is immutable and
                              assigned upon creation.
                            type: string
                            examples:
                              - '1'
                          name:
                            description: >-
                              The descriptive name of the warehouse, intended for readability and identification within
                              the application's user interface.
                            type: string
                            examples:
                              - Warehouse
                          code:
                            description: >-
                              A unique code assigned to the warehouse, intended for readability and identification
                              within the application's user interface.
                            type: string
                            examples:
                              - WZ1
                          address:
                            description: >-
                              The physical street address of the warehouse. This provides the geographical location of
                              the storage facility.
                            type:
                              - string
                              - 'null'
                            examples:
                              - Warehouse street, 10, Country
                          observations:
                            description: >-
                              Free-text field for any additional notes, specific instructions, or relevant details
                              pertaining to this warehouse.
                            type:
                              - string
                              - 'null'
                            examples:
                              - Operational hours from 9am to 7pm, entrance by the large door on the side.
                          created_at:
                            description: >-
                              The timestamp indicating when the warehouse record was initially created in the system.
                              This value is automatically set upon the creation of a new warehouse.
                            type: string
                            format: date-time
                            examples:
                              - '2025-05-27T11:44:46.000Z'
                          updated_at:
                            description: >-
                              The timestamp indicating when the warehouse record was last modified. This value is
                              automatically updated whenever any attribute of the warehouse is changed and saved.
                            type: string
                            format: date-time
                            examples:
                              - '2025-05-27T11:44:46.000Z'
                          associated_operators:
                            description: >-
                              A list of operators associated with this warehouse. This defines the personnel linked to
                              this storage location and their respective roles or responsibilities.
                            type: array
                            items:
                              title: AssociatedOperator
                              description: >-
                                Details of an operator associated with a warehouse, defining their specific role or
                                permissions.
                              type: object
                              properties:
                                operator_id:
                                  description: >-
                                    The unique identifier of the operator within the system. This ID is used to
                                    reference the specific personnel associated with the warehouse.
                                  type: integer
                                  examples:
                                    - 1
                                permission:
                                  description: >-
                                    The specific permission or role assigned to this operator in relation to the
                                    warehouse. This dictates the actions the operator is authorized to perform.
                                  type: string
                                  enum:
                                    - manager
              examples:
                Example:
                  value:
                    data:
                      type: stock-warehouse
                      id: '18'
                      attributes:
                        warehouse_id: '18'
                        name: Armazém AVAC - Geral
                        code: GERAL
                        observations: abc
                        address: Rua da Constituição, 346
                        associated_operators:
                          - operator_id: 1
                            permission: manager
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /stocks/warehouses/{warehouseId}/associated-operators/{operatorId}:
    delete:
      operationId: deleteWarehouseAssociatedOperator
      tags:
        - Warehouses
      summary: Remove the association between an associated operator and a warehouse
      description: This endpoint allows you to delete a specific association of an associated operator to a warehouse.
      parameters:
        - name: warehouseId
          in: path
          description: The unique identifier of the warehouse within the system. This ID is immutable and assigned upon creation.
          required: true
          schema:
            type: string
            examples:
              - '1'
        - name: operatorId
          in: path
          description: >-
            The unique identifier of the operator within the system. This ID is used to reference the specific personnel
            associated with the warehouse.
          required: true
          schema:
            type: string
            examples:
              - '1'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: Warehouse
                    description: Detailed structure of a warehouse model.
                    type: object
                    properties:
                      id:
                        description: >-
                          The unique identifier of the warehouse within the system. This ID is immutable and assigned
                          upon creation.
                        type: string
                        examples:
                          - '1'
                        readOnly: true
                      type:
                        description: The resource type, identifying this as a warehouse.
                        type: string
                        enum:
                          - stock-warehouse
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          warehouse_id:
                            description: >-
                              The unique identifier of the warehouse within the system. This ID is immutable and
                              assigned upon creation.
                            type: string
                            examples:
                              - '1'
                          name:
                            description: >-
                              The descriptive name of the warehouse, intended for readability and identification within
                              the application's user interface.
                            type: string
                            examples:
                              - Warehouse
                          code:
                            description: >-
                              A unique code assigned to the warehouse, intended for readability and identification
                              within the application's user interface.
                            type: string
                            examples:
                              - WZ1
                          address:
                            description: >-
                              The physical street address of the warehouse. This provides the geographical location of
                              the storage facility.
                            type:
                              - string
                              - 'null'
                            examples:
                              - Warehouse street, 10, Country
                          observations:
                            description: >-
                              Free-text field for any additional notes, specific instructions, or relevant details
                              pertaining to this warehouse.
                            type:
                              - string
                              - 'null'
                            examples:
                              - Operational hours from 9am to 7pm, entrance by the large door on the side.
                          created_at:
                            description: >-
                              The timestamp indicating when the warehouse record was initially created in the system.
                              This value is automatically set upon the creation of a new warehouse.
                            type: string
                            format: date-time
                            examples:
                              - '2025-05-27T11:44:46.000Z'
                          updated_at:
                            description: >-
                              The timestamp indicating when the warehouse record was last modified. This value is
                              automatically updated whenever any attribute of the warehouse is changed and saved.
                            type: string
                            format: date-time
                            examples:
                              - '2025-05-27T11:44:46.000Z'
                          associated_operators:
                            description: >-
                              A list of operators associated with this warehouse. This defines the personnel linked to
                              this storage location and their respective roles or responsibilities.
                            type: array
                            items:
                              title: AssociatedOperator
                              description: >-
                                Details of an operator associated with a warehouse, defining their specific role or
                                permissions.
                              type: object
                              properties:
                                operator_id:
                                  description: >-
                                    The unique identifier of the operator within the system. This ID is used to
                                    reference the specific personnel associated with the warehouse.
                                  type: integer
                                  examples:
                                    - 1
                                permission:
                                  description: >-
                                    The specific permission or role assigned to this operator in relation to the
                                    warehouse. This dictates the actions the operator is authorized to perform.
                                  type: string
                                  enum:
                                    - manager
              examples:
                Example:
                  value:
                    data:
                      type: stock-warehouse
                      id: '18'
                      attributes:
                        warehouse_id: '18'
                        name: Armazém AVAC - Geral
                        code: GERAL
                        observations: abc
                        address: Rua da Constituição, 346
                        associated_operators:
                          - operator_id: 1
                            permission: manager
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /stocks/warehouses/{warehouseId}/registry:
    get:
      operationId: getStockWarehousesRegistry
      tags:
        - Warehouses
      summary: List all warehouse registry
      description: >-
        The registry provides a chronological record of modifications to the warehouse resource, including creation,
        updates, deletions, and changes to associated operators.
      parameters:
        - name: warehouseId
          in: path
          description: The unique identifier of the warehouse within the system. This ID is immutable and assigned upon creation.
          required: true
          schema:
            type: string
            examples:
              - '1'
        - name: expand
          in: query
          description: A comma-separated list of related resources to include in the response data.
          required: false
          schema:
            type: string
            enum:
              - operator
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      title: WarehouseRegistry
                      description: >-
                        Detailed structure of a warehouse registry entry, recording specific changes or events related
                        to a warehouse.
                      type: object
                      properties:
                        id:
                          description: >-
                            The unique identifier of this warehouse registry entry within the system. This ID is
                            immutable and assigned upon creation.
                          type: string
                          examples:
                            - '1'
                          readOnly: true
                        type:
                          description: The resource type, identifying this as a warehouse registry entry.
                          type: string
                          enum:
                            - stock-warehouse-registry
                          readOnly: true
                        attributes:
                          type: object
                          properties:
                            warehouse_registry_id:
                              description: >-
                                The unique identifier of this warehouse registry entry within the system. This ID is
                                immutable and assigned upon creation.
                              type: string
                              examples:
                                - '2'
                            warehouse_id:
                              description: The unique identifier of the warehouse that this registry entry is associated with.
                              type: string
                              examples:
                                - '1'
                            operator_id:
                              description: >-
                                The unique identifier of the operator who initiated the action recorded in this registry
                                entry. This helps track user-based changes.
                              type: string
                              examples:
                                - '3'
                            action:
                              description: >-
                                The specific action that was performed on the warehouse. This indicates the type of
                                change or event that occurred.
                              type: string
                              enum:
                                - CREATED
                                - UPDATED
                                - DELETED
                                - ADDED_ASSOCIATED_OPERATOR
                                - REMOVED_ASSOCIATED_OPERATOR
                            field:
                              description: >-
                                The specific field or aspect of the warehouse that was affected by the recorded action.
                                This provides context for the change.
                              type: string
                              enum:
                                - CODE
                                - NAME
                                - OBSERVATIONS
                                - ADDRESS
                                - OPERATOR
                            from:
                              description: >-
                                The value of the 'field' before the action was performed. This is null for
                                "ADDED_ASSOCIATED_OPERATOR" and "CREATED" events.
                              type:
                                - string
                                - 'null'
                              examples:
                                - Warehouse1
                            to:
                              description: >-
                                The value of the 'field' after the action was performed. This is null for
                                "REMOVED_ASSOCIATED_OPERATOR" and "CREATED" events.
                              type:
                                - string
                                - 'null'
                              examples:
                                - Warehouse
                            aux_id:
                              description: >-
                                An auxiliary identifier related to the action. For example, when an operator is
                                associated or removed, it would countain that id.
                              type:
                                - string
                                - 'null'
                              examples:
                                - '10'
                            created_at:
                              description: >-
                                The timestamp indicating when this warehouse registry entry was created in the system,
                                recording the moment the action occurred.
                              type: string
                              format: date-time
                              examples:
                                - '2025-05-27T17:54:08.000Z'
                  included:
                    description: List of relationships to be included
                    type: array
                    items:
                      type: object
                    uniqueItems: true
                  meta:
                    title: Meta
                    description: Meta model structure details
                    type: object
                    properties:
                      pagination:
                        type: object
                        properties:
                          total:
                            description: Total items.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          count:
                            description: Total items returned for the current page.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          per_page:
                            description: Maximum number of records per page.
                            type: integer
                            minimum: 1
                            default: 200
                            examples:
                              - 1
                          current_page:
                            description: Number of the current page.
                            type: integer
                            minimum: 1
                            default: 1
                          total_pages:
                            description: Number of the total pages.
                            type: integer
                            minimum: 1
                            default: 1
                        required:
                          - total
                          - count
                          - per_page
                          - current_page
                          - total_pages
                  links:
                    title: Response Links on listing operations
                    description: >-
                      Requests that return multiple items include a `links` attribute, with links related to request's
                      context.
                    type: object
                    properties:
                      self:
                        description: Current response link.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      first:
                        description: Link to the first page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      last:
                        description: Link to the previous page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      next:
                        description: Link to the next page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                    required:
                      - self
                      - first
                      - last
              examples:
                Example:
                  value:
                    data:
                      - type: stock-warehouse-registry
                        id: '1'
                        attributes:
                          warehouse_registry_id: '1'
                          warehouse_id: '1'
                          operator_id: '1'
                          action: REMOVED_ASSOCIATED_OPERATOR
                          field: OPERATOR
                          from: Empresa Exemplo
                          to: Empresa Exemplo Nova
                          aux_id: '1'
                          created_at: '2024-08-14T16:42:33.000000Z'
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /stocks/warehouses/{warehouseId}/stock-transactions:
    post:
      operationId: postStockWarehousesStockTransactions
      tags:
        - Warehouses
      summary: Create a stock transaction for a warehouse
      description: This endpoint allows you to record transactions affecting the stock levels of a specific warehouse.
      parameters:
        - name: warehouseId
          in: path
          description: The unique identifier of the warehouse within the system. This ID is immutable and assigned upon creation.
          required: true
          schema:
            type: string
            examples:
              - '1'
      requestBody:
        content:
          application/json:
            schema:
              description: Payload for recording a batch stock transaction for a specific warehouse.
              type: object
              properties:
                action:
                  description: Specifies the type of stock transaction being performed as a batch.
                  type: string
                  enum:
                    - WAREHOUSE_SUBTRACT
                    - WAREHOUSE_ADD
                observations:
                  description: General notes or details applicable to the entire batch of stock transactions.
                  type: string
                transactions:
                  description: An array containing details for one or more individual stock transactions to be recorded.
                  type: array
                  items:
                    type: object
                    properties:
                      material_id:
                        description: The unique identifier of the specific material involved in this transaction.
                        type: integer
                      quantity:
                        description: The quantity of the material being transacted.
                        type: integer
                      observations:
                        description: Specific notes or details related to this individual material's transaction within the batch.
                        type: string
                      cost_price:
                        description: >-
                          The cost price associated with this material at the time of the transaction. This is typically
                          the purchase price or standard cost.
                        type: integer
                    required:
                      - material_id
                      - quantity
                      - cost_price
              required:
                - action
                - transactions
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      title: StockTransactionBatch
                      description: StockTransactionBatch model structure details
                      type: object
                      properties:
                        id:
                          description: UUID of the transaction batch
                          type: string
                          readOnly: true
                        type:
                          description: Model type
                          type: string
                          enum:
                            - stock-transaction-batch
                          readOnly: true
                        attributes:
                          type: object
                          properties:
                            stock_transaction_batch_id:
                              description: UUID of the transaction batch
                              type: string
                              examples:
                                - 019169e9-1210-7eef-882f-39c6332a156e
                            operator_id:
                              description: ID of the operator
                              type: integer
                              examples:
                                - 1
                            action:
                              description: Transaction's action
                              type: string
                              enum:
                                - TRANSFER_STOCK
                                - WAREHOUSE_SUBTRACT
                                - WAREHOUSE_ADD
                                - MATERIAL_SUBTRACT
                                - MATERIAL_ADD
                                - CONSUME
                                - PURCHASE
                              examples:
                                - TRANSFER_STOCK
                            observations:
                              description: Transaction batch observations
                              type:
                                - string
                                - 'null'
                            source_id:
                              description: Transaction batch source model id
                              type: integer
                              examples:
                                - 25
                            source_type:
                              description: Transaction batch source model type
                              type: string
                              enum:
                                - FAILURE
                                - SCHEDULED_WORK_ORDER
                                - ORDER
                                - ELEMENT
                                - MANUAL
                              examples:
                                - FAILURE
                            date_created:
                              description: Transaction batch creation timestamp (ISO 8601)
                              type:
                                - string
                                - 'null'
                              format: date-time
                              readOnly: true
                              examples:
                                - '2026-05-22T10:15:30+00:00'
                            date_updated:
                              description: Transaction batch last update timestamp (ISO 8601)
                              type:
                                - string
                                - 'null'
                              format: date-time
                              readOnly: true
                              examples:
                                - '2026-05-22T10:15:30+00:00'
                  included:
                    description: List of relationships to be included
                    type: array
                    items:
                      title: StockTransaction
                      description: StockTransaction model structure details
                      type: object
                      properties:
                        id:
                          description: ID of the transaction
                          type: string
                          readOnly: true
                        type:
                          description: Model type
                          type: string
                          enum:
                            - stock-transaction
                          readOnly: true
                        attributes:
                          type: object
                          properties:
                            warehouse_id:
                              description: ID of the warehouse
                              type: integer
                              examples:
                                - 1
                            material_id:
                              description: ID of the material
                              type: integer
                              examples:
                                - 1
                            quantity:
                              description: Transaction's quantity
                              type: integer
                              examples:
                                - 25
                            action:
                              description: Transaction's action
                              type: string
                              enum:
                                - ADD
                                - SUBTRACT
                              examples:
                                - SUBTRACT
                            observations:
                              description: Transaction's observations
                              type:
                                - string
                                - 'null'
                            cost_price:
                              description: Transaction's associated price
                              type: integer
                              examples:
                                - 25
                            created_at:
                              description: Transaction's created date
                              type: string
                              examples:
                                - '2024-08-16T13:33:39.000000Z'
                            operator_id:
                              description: ID of the operator
                              type: integer
                              examples:
                                - 1
                            stock_transaction_batch_id:
                              description: ID of the parent transaction batch
                              type: integer
                              readOnly: true
                              examples:
                                - 1
                    uniqueItems: true
                  meta:
                    title: Meta
                    description: Meta model structure details
                    type: object
                    properties:
                      pagination:
                        type: object
                        properties:
                          total:
                            description: Total items.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          count:
                            description: Total items returned for the current page.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          per_page:
                            description: Maximum number of records per page.
                            type: integer
                            minimum: 1
                            default: 200
                            examples:
                              - 1
                          current_page:
                            description: Number of the current page.
                            type: integer
                            minimum: 1
                            default: 1
                          total_pages:
                            description: Number of the total pages.
                            type: integer
                            minimum: 1
                            default: 1
                        required:
                          - total
                          - count
                          - per_page
                          - current_page
                          - total_pages
                  links:
                    title: Response Links on listing operations
                    description: >-
                      Requests that return multiple items include a `links` attribute, with links related to request's
                      context.
                    type: object
                    properties:
                      self:
                        description: Current response link.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      first:
                        description: Link to the first page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      last:
                        description: Link to the previous page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      next:
                        description: Link to the next page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                    required:
                      - self
                      - first
                      - last
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /stocks/warehouses/{warehouseId}/check-associations:
    get:
      operationId: getWarehousesAssociations
      tags:
        - Warehouses
      summary: Check if warehouse has dependencies
      description: >-
        This endpoint allows you to determine if a specific warehouse has any existing dependencies (such as associated
        operators or ongoing purchases).
      parameters:
        - name: warehouseId
          in: path
          description: The unique identifier of the warehouse within the system. This ID is immutable and assigned upon creation.
          required: true
          schema:
            type: string
            examples:
              - '1'
        - name: associations
          in: query
          description: A comma-separated list of dependencies (related resources).
          required: false
          schema:
            type: string
            enum:
              - operators
              - purchases
      responses:
        '200':
          description: Response indicating the dependencies status of the warehouse.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - success
                  data:
                    type: object
                    properties:
                      operators:
                        description: >-
                          Indicates if the warehouse has associated operators (whose default warehouse is this one) that
                          prevent deletion. 'true' if dependencies exist, 'false' otherwise.
                        type: boolean
                      purchases:
                        description: >-
                          Indicates if the warehouse has ongoing purchases that prevent deletion. 'true' if dependencies
                          exist, 'false' otherwise.
                        type: boolean
                required:
                  - status
                  - data
              examples:
                default:
                  value:
                    summary: No dependencies found for both types
                    value:
                      status: success
                      data:
                        operators: false
                        purchases: false
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /suppliers:
    get:
      operationId: getSuppliers
      tags:
        - Suppliers
      summary: List all Suppliers
      description: This endpoint allows you to obtain all Suppliers.
      parameters:
        - name: expanded
          in: query
          description: >-
            Allows you to expand the available Supplier relations. You can expand multiple relations at once when
            concatenating with ',' (e.g. expanded=contacts,files)
          schema:
            type: string
            enum:
              - contacts
              - files
              - handshake
              - categories
              - services
              - invite
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      title: Supplier
                      description: Supplier model structure details
                      type: object
                      properties:
                        id:
                          description: ID of the Supplier
                          type: string
                          examples:
                            - '123'
                          readOnly: true
                        type:
                          description: Model type
                          type: string
                          enum:
                            - supplier
                          examples:
                            - supplier
                          readOnly: true
                        attributes:
                          type: object
                          properties:
                            supplier_id:
                              description: ID of the Supplier
                              type: integer
                              examples:
                                - 123
                            name:
                              description: Name of the Supplier
                              type: string
                              examples:
                                - John Doe
                            code:
                              description: Code of the Supplier
                              type:
                                - string
                                - 'null'
                              examples:
                                - abc123
                            vat:
                              description: NIF/ VAT Number of the Supplier
                              type:
                                - string
                                - 'null'
                              examples:
                                - '123456789'
                            address:
                              description: Address of the Supplier
                              type:
                                - string
                                - 'null'
                              examples:
                                - 5221 Brook Rd
                            postal_code:
                              description: Postal Code of the Supplier
                              type:
                                - string
                                - 'null'
                              examples:
                                - 4321-123
                            city:
                              description: City of the Supplier
                              type:
                                - string
                                - 'null'
                              examples:
                                - Richmond
                            area:
                              description: The district, region or state where the Supplier is from
                              type:
                                - string
                                - 'null'
                              examples:
                                - Madrid
                            country:
                              description: Country of the Supplier
                              type:
                                - string
                                - 'null'
                              examples:
                                - ES
                            iban:
                              description: IBAN of the Supplier
                              type:
                                - string
                                - 'null'
                              examples:
                                - 1234 4321 5678 8765 9999 1
                            market_supplier_id:
                              description: The UUID of the Supplier ID in the Infraspeak Market
                              type:
                                - string
                                - 'null'
                              format: uuid
                              examples:
                                - dd1c6f55-295d-4010-993a-81e2c7240878
                            supplier_uuid:
                              description: UUID of the Supplier
                              type: string
                              format: uuid
                              examples:
                                - dd1c6f55-295d-4010-993a-81e2c7240878
                            date_created:
                              description: Creation date of Supplier
                              type: string
                              format: date-time
                              examples:
                                - '2022-12-12 12:12:30'
                            has_handshake:
                              description: Indicates if the Supplier is "connected" to work on Infraspeak Network
                              type: boolean
                              examples:
                                - true
                            profile_steps_count:
                              description: The count of profile steps that the Supplier had done in the Infraspeak Network
                              type: integer
                              examples:
                                - 3
                        relationships:
                          description: The relationships of the Supplier (Only present when expanded in the request)
                          type: object
                          properties:
                            contacts:
                              description: The Contacts associated with the Supplier
                              type: object
                            files:
                              description: The Files associated with the Supplier
                              type: object
                            handshake:
                              description: The Infraspeak Network Handshake associated with the Supplier
                              type: object
                            categories:
                              description: The Infraspeak Market Categories associated with the Supplier
                              type: object
                            services:
                              description: The Infraspeak Market Services associated with the Supplier
                              type: object
                            invite:
                              description: The Infraspeak Network Invite associated with the Supplier
                              type: object
                      required:
                        - id
                        - type
                        - attributes
                  meta:
                    title: Meta
                    description: Meta model structure details
                    type: object
                    properties:
                      pagination:
                        type: object
                        properties:
                          total:
                            description: Total items.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          count:
                            description: Total items returned for the current page.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          per_page:
                            description: Maximum number of records per page.
                            type: integer
                            minimum: 1
                            default: 200
                            examples:
                              - 1
                          current_page:
                            description: Number of the current page.
                            type: integer
                            minimum: 1
                            default: 1
                          total_pages:
                            description: Number of the total pages.
                            type: integer
                            minimum: 1
                            default: 1
                        required:
                          - total
                          - count
                          - per_page
                          - current_page
                          - total_pages
                  links:
                    title: Response Links on listing operations
                    description: >-
                      Requests that return multiple items include a `links` attribute, with links related to request's
                      context.
                    type: object
                    properties:
                      self:
                        description: Current response link.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      first:
                        description: Link to the first page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      last:
                        description: Link to the previous page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      next:
                        description: Link to the next page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                    required:
                      - self
                      - first
                      - last
              examples:
                Example:
                  value:
                    data:
                      - type: supplier
                        id: '120'
                        attributes:
                          supplier_id: 120
                          name: FMOperations Lda.
                          code: BA02
                          vat: '123456789'
                          address: Market St, 312
                          postal_code: BS10331
                          city: Bristol
                          area: New York
                          country: US
                          iban: 1234 4321 5678 8765 9999 1
                          market_supplier_id: dd1c6f55-295d-4010-993a-81e2c7240878
                          supplier_uuid: dd1c6f55-295d-4010-993a-81e2c7240878
                          date_created: '2019-12-30T10:24:48+00:00'
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
    post:
      operationId: createSupplier
      tags:
        - Suppliers
      summary: Create a new Supplier
      description: This endpoint allows you to create a new Supplier.
      requestBody:
        content:
          application/json:
            schema:
              description: Supplier Create Payload
              type: object
              properties:
                name:
                  description: The name of the Supplier.
                  type: string
                  examples:
                    - John Doe
                code:
                  description: The code for the Supplier. Must be unique in the Entity.
                  type: string
                  examples:
                    - BA02
                vat:
                  description: The NIF/VAT number of the Supplier.
                  type:
                    - string
                    - 'null'
                  examples:
                    - '123456789'
                address:
                  description: The address of the Supplier.
                  type:
                    - string
                    - 'null'
                  examples:
                    - 5221 Brook Rd
                post_code:
                  description: The postal code of the Supplier.
                  type:
                    - string
                    - 'null'
                  examples:
                    - 4321-123
                city:
                  description: The city of the Supplier.
                  type:
                    - string
                    - 'null'
                  examples:
                    - Richmond
                area:
                  description: The district, region or state where the Supplier is from
                  type:
                    - string
                    - 'null'
                  examples:
                    - Madrid
                latitude:
                  description: The latitude of the Supplier's Address
                  type:
                    - number
                    - 'null'
                  examples:
                    - 13.4134995
                longitude:
                  description: The longitude of the Supplier's Address
                  type:
                    - number
                    - 'null'
                  examples:
                    - 26.826999
                iban:
                  description: The IBAN of the Supplier
                  type:
                    - string
                    - 'null'
                  examples:
                    - 1234 4321 5678 8765 9999 1
                add_to_market:
                  description: >-
                    Indicates if this Supplier should be added to the Infraspeak Market, where other Infraspeak Network
                    users will be able to find and request their services. This field will default to false when not
                    sent in the request.
                  type:
                    - boolean
                    - 'null'
                  examples:
                    - true
                contacts:
                  description: A list of Contact IDs to associate with the Supplier.
                  type:
                    - array
                    - 'null'
                  items:
                    description: The ID of the contact.
                    type: integer
                    examples:
                      - 123
              required:
                - name
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: Supplier
                    description: Supplier model structure details
                    type: object
                    properties:
                      id:
                        description: ID of the Supplier
                        type: string
                        examples:
                          - '123'
                        readOnly: true
                      type:
                        description: Model type
                        type: string
                        enum:
                          - supplier
                        examples:
                          - supplier
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          supplier_id:
                            description: ID of the Supplier
                            type: integer
                            examples:
                              - 123
                          name:
                            description: Name of the Supplier
                            type: string
                            examples:
                              - John Doe
                          code:
                            description: Code of the Supplier
                            type:
                              - string
                              - 'null'
                            examples:
                              - abc123
                          vat:
                            description: NIF/ VAT Number of the Supplier
                            type:
                              - string
                              - 'null'
                            examples:
                              - '123456789'
                          address:
                            description: Address of the Supplier
                            type:
                              - string
                              - 'null'
                            examples:
                              - 5221 Brook Rd
                          postal_code:
                            description: Postal Code of the Supplier
                            type:
                              - string
                              - 'null'
                            examples:
                              - 4321-123
                          city:
                            description: City of the Supplier
                            type:
                              - string
                              - 'null'
                            examples:
                              - Richmond
                          area:
                            description: The district, region or state where the Supplier is from
                            type:
                              - string
                              - 'null'
                            examples:
                              - Madrid
                          country:
                            description: Country of the Supplier
                            type:
                              - string
                              - 'null'
                            examples:
                              - ES
                          iban:
                            description: IBAN of the Supplier
                            type:
                              - string
                              - 'null'
                            examples:
                              - 1234 4321 5678 8765 9999 1
                          market_supplier_id:
                            description: The UUID of the Supplier ID in the Infraspeak Market
                            type:
                              - string
                              - 'null'
                            format: uuid
                            examples:
                              - dd1c6f55-295d-4010-993a-81e2c7240878
                          supplier_uuid:
                            description: UUID of the Supplier
                            type: string
                            format: uuid
                            examples:
                              - dd1c6f55-295d-4010-993a-81e2c7240878
                          date_created:
                            description: Creation date of Supplier
                            type: string
                            format: date-time
                            examples:
                              - '2022-12-12 12:12:30'
                          has_handshake:
                            description: Indicates if the Supplier is "connected" to work on Infraspeak Network
                            type: boolean
                            examples:
                              - true
                          profile_steps_count:
                            description: The count of profile steps that the Supplier had done in the Infraspeak Network
                            type: integer
                            examples:
                              - 3
                      relationships:
                        description: The relationships of the Supplier (Only present when expanded in the request)
                        type: object
                        properties:
                          contacts:
                            description: The Contacts associated with the Supplier
                            type: object
                          files:
                            description: The Files associated with the Supplier
                            type: object
                          handshake:
                            description: The Infraspeak Network Handshake associated with the Supplier
                            type: object
                          categories:
                            description: The Infraspeak Market Categories associated with the Supplier
                            type: object
                          services:
                            description: The Infraspeak Market Services associated with the Supplier
                            type: object
                          invite:
                            description: The Infraspeak Network Invite associated with the Supplier
                            type: object
                    required:
                      - id
                      - type
                      - attributes
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /suppliers/{supplier}:
    get:
      operationId: getSupplier
      tags:
        - Suppliers
      summary: Get a Supplier
      description: This endpoint allows you to get information about a specific Supplier.
      parameters:
        - name: supplier
          in: path
          description: the Supplier id
          required: true
          schema:
            type: string
        - name: expanded
          in: query
          description: >-
            Allows you to expand the available Supplier relations. You can expand multiple relations at once when
            concatenating with ',' (e.g. expanded=contacts,files)
          schema:
            type: string
            enum:
              - contacts
              - files
              - handshake
              - categories
              - services
              - invite
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: Supplier
                    description: Supplier model structure details
                    type: object
                    properties:
                      id:
                        description: ID of the Supplier
                        type: string
                        examples:
                          - '123'
                        readOnly: true
                      type:
                        description: Model type
                        type: string
                        enum:
                          - supplier
                        examples:
                          - supplier
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          supplier_id:
                            description: ID of the Supplier
                            type: integer
                            examples:
                              - 123
                          name:
                            description: Name of the Supplier
                            type: string
                            examples:
                              - John Doe
                          code:
                            description: Code of the Supplier
                            type:
                              - string
                              - 'null'
                            examples:
                              - abc123
                          vat:
                            description: NIF/ VAT Number of the Supplier
                            type:
                              - string
                              - 'null'
                            examples:
                              - '123456789'
                          address:
                            description: Address of the Supplier
                            type:
                              - string
                              - 'null'
                            examples:
                              - 5221 Brook Rd
                          postal_code:
                            description: Postal Code of the Supplier
                            type:
                              - string
                              - 'null'
                            examples:
                              - 4321-123
                          city:
                            description: City of the Supplier
                            type:
                              - string
                              - 'null'
                            examples:
                              - Richmond
                          area:
                            description: The district, region or state where the Supplier is from
                            type:
                              - string
                              - 'null'
                            examples:
                              - Madrid
                          country:
                            description: Country of the Supplier
                            type:
                              - string
                              - 'null'
                            examples:
                              - ES
                          iban:
                            description: IBAN of the Supplier
                            type:
                              - string
                              - 'null'
                            examples:
                              - 1234 4321 5678 8765 9999 1
                          market_supplier_id:
                            description: The UUID of the Supplier ID in the Infraspeak Market
                            type:
                              - string
                              - 'null'
                            format: uuid
                            examples:
                              - dd1c6f55-295d-4010-993a-81e2c7240878
                          supplier_uuid:
                            description: UUID of the Supplier
                            type: string
                            format: uuid
                            examples:
                              - dd1c6f55-295d-4010-993a-81e2c7240878
                          date_created:
                            description: Creation date of Supplier
                            type: string
                            format: date-time
                            examples:
                              - '2022-12-12 12:12:30'
                          has_handshake:
                            description: Indicates if the Supplier is "connected" to work on Infraspeak Network
                            type: boolean
                            examples:
                              - true
                          profile_steps_count:
                            description: The count of profile steps that the Supplier had done in the Infraspeak Network
                            type: integer
                            examples:
                              - 3
                      relationships:
                        description: The relationships of the Supplier (Only present when expanded in the request)
                        type: object
                        properties:
                          contacts:
                            description: The Contacts associated with the Supplier
                            type: object
                          files:
                            description: The Files associated with the Supplier
                            type: object
                          handshake:
                            description: The Infraspeak Network Handshake associated with the Supplier
                            type: object
                          categories:
                            description: The Infraspeak Market Categories associated with the Supplier
                            type: object
                          services:
                            description: The Infraspeak Market Services associated with the Supplier
                            type: object
                          invite:
                            description: The Infraspeak Network Invite associated with the Supplier
                            type: object
                    required:
                      - id
                      - type
                      - attributes
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
    delete:
      operationId: deleteSupplier
      tags:
        - Suppliers
      summary: Delete a Supplier
      description: This endpoint allows you to delete a specific Supplier.
      parameters:
        - name: supplier
          in: path
          description: the Supplier id
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items: {}
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
    patch:
      operationId: updateSupplier
      tags:
        - Suppliers
      summary: Update a Supplier
      description: This endpoint allows you to update a specific Supplier.
      parameters:
        - name: supplier
          in: path
          description: the Supplier id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              description: Supplier Update Payload
              type: object
              properties:
                name:
                  description: The name of the Supplier.
                  type: string
                  examples:
                    - John Doe
                code:
                  description: The code for the Supplier. Must be unique in the Entity.
                  type: string
                  examples:
                    - BA02
                vat:
                  description: The NIF/VAT number of the Supplier.
                  type:
                    - string
                    - 'null'
                  examples:
                    - '123456789'
                address:
                  description: The address of the Supplier.
                  type:
                    - string
                    - 'null'
                  examples:
                    - 5221 Brook Rd
                post_code:
                  description: The postal code of the Supplier.
                  type:
                    - string
                    - 'null'
                  examples:
                    - 4321-123
                city:
                  description: The city of the Supplier.
                  type:
                    - string
                    - 'null'
                  examples:
                    - Richmond
                area:
                  description: The district, region or state where the Supplier is from
                  type:
                    - string
                    - 'null'
                  examples:
                    - Madrid
                latitude:
                  description: The latitude of the Supplier's Address
                  type:
                    - number
                    - 'null'
                  examples:
                    - 13.4134995
                longitude:
                  description: The longitude of the Supplier's Address
                  type:
                    - number
                    - 'null'
                  examples:
                    - 26.826999
                iban:
                  description: The IBAN of the Supplier
                  type:
                    - string
                    - 'null'
                  examples:
                    - 1234 4321 5678 8765 9999 1
                add_to_market:
                  description: >-
                    Indicates if this Supplier should be added to the Infraspeak Market, where other Infraspeak Network
                    users will be able to find and request their services. This field will default to false when not
                    sent in the request. If the Supplier was already added to the Infraspeak Market, it won't be added
                    again.
                  type:
                    - boolean
                    - 'null'
                  examples:
                    - true
                contacts:
                  description: >-
                    A list of Contact IDs to associate with the Supplier. If sent in the request, this list will replace
                    any list of contacts previously associated with the Supplier.
                  type:
                    - array
                    - 'null'
                  items:
                    description: The ID of the contact.
                    type: integer
                    examples:
                      - 123
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: Supplier
                    description: Supplier model structure details
                    type: object
                    properties:
                      id:
                        description: ID of the Supplier
                        type: string
                        examples:
                          - '123'
                        readOnly: true
                      type:
                        description: Model type
                        type: string
                        enum:
                          - supplier
                        examples:
                          - supplier
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          supplier_id:
                            description: ID of the Supplier
                            type: integer
                            examples:
                              - 123
                          name:
                            description: Name of the Supplier
                            type: string
                            examples:
                              - John Doe
                          code:
                            description: Code of the Supplier
                            type:
                              - string
                              - 'null'
                            examples:
                              - abc123
                          vat:
                            description: NIF/ VAT Number of the Supplier
                            type:
                              - string
                              - 'null'
                            examples:
                              - '123456789'
                          address:
                            description: Address of the Supplier
                            type:
                              - string
                              - 'null'
                            examples:
                              - 5221 Brook Rd
                          postal_code:
                            description: Postal Code of the Supplier
                            type:
                              - string
                              - 'null'
                            examples:
                              - 4321-123
                          city:
                            description: City of the Supplier
                            type:
                              - string
                              - 'null'
                            examples:
                              - Richmond
                          area:
                            description: The district, region or state where the Supplier is from
                            type:
                              - string
                              - 'null'
                            examples:
                              - Madrid
                          country:
                            description: Country of the Supplier
                            type:
                              - string
                              - 'null'
                            examples:
                              - ES
                          iban:
                            description: IBAN of the Supplier
                            type:
                              - string
                              - 'null'
                            examples:
                              - 1234 4321 5678 8765 9999 1
                          market_supplier_id:
                            description: The UUID of the Supplier ID in the Infraspeak Market
                            type:
                              - string
                              - 'null'
                            format: uuid
                            examples:
                              - dd1c6f55-295d-4010-993a-81e2c7240878
                          supplier_uuid:
                            description: UUID of the Supplier
                            type: string
                            format: uuid
                            examples:
                              - dd1c6f55-295d-4010-993a-81e2c7240878
                          date_created:
                            description: Creation date of Supplier
                            type: string
                            format: date-time
                            examples:
                              - '2022-12-12 12:12:30'
                          has_handshake:
                            description: Indicates if the Supplier is "connected" to work on Infraspeak Network
                            type: boolean
                            examples:
                              - true
                          profile_steps_count:
                            description: The count of profile steps that the Supplier had done in the Infraspeak Network
                            type: integer
                            examples:
                              - 3
                      relationships:
                        description: The relationships of the Supplier (Only present when expanded in the request)
                        type: object
                        properties:
                          contacts:
                            description: The Contacts associated with the Supplier
                            type: object
                          files:
                            description: The Files associated with the Supplier
                            type: object
                          handshake:
                            description: The Infraspeak Network Handshake associated with the Supplier
                            type: object
                          categories:
                            description: The Infraspeak Market Categories associated with the Supplier
                            type: object
                          services:
                            description: The Infraspeak Market Services associated with the Supplier
                            type: object
                          invite:
                            description: The Infraspeak Network Invite associated with the Supplier
                            type: object
                    required:
                      - id
                      - type
                      - attributes
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /warehouses:
    get:
      operationId: getWarehousesLegacy
      tags:
        - Warehouses
      summary: List all warehouses
      description: >-
        This endpoint allows you to get all Warehouses. By default, all warehouses have a "child", called section, where
        the material stock quantities are associated.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      title: Warehouse
                      description: Detailed structure of a warehouse model.
                      type: object
                      properties:
                        id:
                          description: >-
                            The unique identifier of the warehouse within the system. This ID is immutable and assigned
                            upon creation.
                          type: string
                          examples:
                            - '1'
                          readOnly: true
                        type:
                          description: The resource type, identifying this as a warehouse.
                          type: string
                          enum:
                            - warehouse
                          readOnly: true
                        attributes:
                          type: object
                          properties:
                            warehouse_id:
                              description: >-
                                The unique identifier of the warehouse within the system. This ID is immutable and
                                assigned upon creation.
                              type: integer
                              examples:
                                - 1
                            entity_id:
                              description: >-
                                The identifier of the account (entity, organization, or client) that owns or manages
                                this warehouse.
                              type: integer
                              examples:
                                - 1
                              readOnly: true
                            name:
                              description: >-
                                The descriptive name of the warehouse, intended for readability and identification
                                within the application's user interface.
                              type: string
                              examples:
                                - Warehouse
                            code:
                              description: >-
                                A unique code assigned to the warehouse, intended for readability and identification
                                within the application's user interface.
                              type: string
                              examples:
                                - WZ1
                            full_code:
                              description: >-
                                A hierarchical code representing the complete lineage of the warehouse within the
                                storage structure. It's formed by concatenating the codes of all its parent warehouses
                                or sections, separated by a dot, followed by the warehouse's own code.
                              type: string
                              examples:
                                - WZ0.WZ1
                            parent_id:
                              description: >-
                                The identifier of the immediate parent warehouse or section in the storage hierarchy. If
                                this is a top-level warehouse, this field will be null.
                              type:
                                - integer
                                - 'null'
                              examples:
                                - 2
                            is_real:
                              description: >-
                                A boolean flag indicating the nature of this storage item. `true` signifies a physical,
                                tangible warehouse location, while `false` represents a logical grouping or section
                                within a larger warehouse.
                              type: boolean
                            observation:
                              description: >-
                                Free-text field for any additional notes, specific instructions, or relevant details
                                pertaining to this warehouse.
                              type:
                                - string
                                - 'null'
                              examples:
                                - Operational hours from 9am to 7pm, entrance by the large door on the side.
                            address:
                              description: >-
                                The physical street address of the warehouse. This provides the geographical location of
                                the storage facility.
                              type:
                                - string
                                - 'null'
                              examples:
                                - Warehouse street, 10, Country
                  included:
                    description: List of relationships to be included
                    type: array
                    items:
                      anyOf:
                        - title: Warehouse
                          description: Detailed structure of a warehouse model.
                          type: object
                          properties:
                            id:
                              description: >-
                                The unique identifier of the warehouse within the system. This ID is immutable and
                                assigned upon creation.
                              type: string
                              examples:
                                - '1'
                              readOnly: true
                            type:
                              description: The resource type, identifying this as a warehouse.
                              type: string
                              enum:
                                - warehouse
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                warehouse_id:
                                  description: >-
                                    The unique identifier of the warehouse within the system. This ID is immutable and
                                    assigned upon creation.
                                  type: integer
                                  examples:
                                    - 1
                                entity_id:
                                  description: >-
                                    The identifier of the account (entity, organization, or client) that owns or manages
                                    this warehouse.
                                  type: integer
                                  examples:
                                    - 1
                                  readOnly: true
                                name:
                                  description: >-
                                    The descriptive name of the warehouse, intended for readability and identification
                                    within the application's user interface.
                                  type: string
                                  examples:
                                    - Warehouse
                                code:
                                  description: >-
                                    A unique code assigned to the warehouse, intended for readability and identification
                                    within the application's user interface.
                                  type: string
                                  examples:
                                    - WZ1
                                full_code:
                                  description: >-
                                    A hierarchical code representing the complete lineage of the warehouse within the
                                    storage structure. It's formed by concatenating the codes of all its parent
                                    warehouses or sections, separated by a dot, followed by the warehouse's own code.
                                  type: string
                                  examples:
                                    - WZ0.WZ1
                                parent_id:
                                  description: >-
                                    The identifier of the immediate parent warehouse or section in the storage
                                    hierarchy. If this is a top-level warehouse, this field will be null.
                                  type:
                                    - integer
                                    - 'null'
                                  examples:
                                    - 2
                                is_real:
                                  description: >-
                                    A boolean flag indicating the nature of this storage item. `true` signifies a
                                    physical, tangible warehouse location, while `false` represents a logical grouping
                                    or section within a larger warehouse.
                                  type: boolean
                                observation:
                                  description: >-
                                    Free-text field for any additional notes, specific instructions, or relevant details
                                    pertaining to this warehouse.
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - Operational hours from 9am to 7pm, entrance by the large door on the side.
                                address:
                                  description: >-
                                    The physical street address of the warehouse. This provides the geographical
                                    location of the storage facility.
                                  type:
                                    - string
                                    - 'null'
                                  examples:
                                    - Warehouse street, 10, Country
                        - title: Operator
                          description: Operator model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Operator
                              type: string
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - operator
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                operator_id:
                                  description: ID of the Operator
                                  type: integer
                                  readOnly: true
                                operator_uuid:
                                  description: Uuid of the Operator
                                  type: string
                                  format: uuid
                                  readOnly: true
                                full_name:
                                  type: string
                                email:
                                  type: string
                                  format: email
                                phone:
                                  type:
                                    - string
                                    - 'null'
                                cellphone:
                                  type:
                                    - string
                                    - 'null'
                                account:
                                  description: Type of account which determines the access permission level.
                                  type: string
                                  enum:
                                    - admin
                                    - manager
                                    - technician
                                    - operator
                                    - reporter
                                language:
                                  type: string
                                  enum:
                                    - ar
                                    - ca
                                    - da_dk
                                    - en
                                    - es
                                    - fr_fr
                                    - pl_pl
                                    - pt_br
                                    - pt_pt
                                    - ko
                                    - zh_cn
                                    - nl_nl
                                    - de_de
                                cost_per_hour:
                                  type: number
                                  minimum: 0
                                  examples:
                                    - 10
                                warehouse_id:
                                  description: ID of the warehouse associated to the Operator by default.
                                  type: integer
                                entity_id:
                                  type: integer
                                  readOnly: true
                                timezone:
                                  description: >
                                    Valid PHP timezone identifier. See the full list here:
                                    https://www.php.net/manual/en/timezones.php.
                                  type: string
                                  examples:
                                    - Europe/Lisbon
                                is_from_network:
                                  type: boolean
                                created_at:
                                  type: string
                                  format: date-time
                                phone_country_code:
                                  type: string
                                  examples:
                                    - US
                                is_first_web_login:
                                  type:
                                    - boolean
                                    - 'null'
                                  readOnly: true
                                status:
                                  type: string
                                  enum:
                                    - WORKING
                                    - AVAILABLE
                                    - OFFLINE
                                  examples:
                                    - WORKING
                            meta:
                              type: object
                              properties:
                                custom_fields:
                                  type:
                                    - object
                                    - 'null'
                                  additionalProperties:
                                    oneOf:
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - SELECT
                                            examples:
                                              - SELECT
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                option_id:
                                                  description: The ID of the selected option
                                                  type: integer
                                                  examples:
                                                    - 123
                                                option_code:
                                                  description: The code of the selected option
                                                  type:
                                                    - string
                                                    - 'null'
                                                  examples:
                                                    - OP01
                                                value:
                                                  description: The value of the selected option
                                                  type: string
                                                  examples:
                                                    - My Option 1
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field supports selecting multiple values
                                                    type: boolean
                                                    examples:
                                                      - true
                                                  managed_by_integrations:
                                                    description: >-
                                                      Indicates if the Custom Field options are only managed by
                                                      integrations
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - TEXT
                                            examples:
                                              - TEXT
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            examples:
                                              - abc
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (Empty for Custom Fields of
                                                  type TEXT)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - BOOLEAN
                                            examples:
                                              - BOOLEAN
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - boolean
                                              - 'null'
                                            examples:
                                              - true
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: >-
                                                  The type settings for the Custom Field (There are none for the Custom
                                                  Field Boolean type)
                                                type: object
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - RELATIONSHIP
                                            examples:
                                              - RELATIONSHIP
                                          value:
                                            description: The current values of the Custom Field in this resource
                                            type:
                                              - array
                                              - 'null'
                                            items:
                                              type: object
                                              properties:
                                                related_to_type:
                                                  description: The type of object that is selected as the Custom Field Values
                                                  type: string
                                                  enum:
                                                    - CLIENT
                                                    - CONTACT
                                                  examples:
                                                    - CLIENT
                                                related_to_id:
                                                  description: The ID of object that is selected as the Custom Field Value
                                                  type: integer
                                                  examples:
                                                    - 123
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_multiple_selection:
                                                    description: Indicates if the Custom Field allows multiple selection
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  relationship_object:
                                                    description: The type of object that is selected as the Custom Field Values
                                                    type: string
                                                    enum:
                                                      - CLIENT
                                                      - CONTACT
                                                    examples:
                                                      - CLIENT
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - DATETIME
                                            examples:
                                              - DATETIME
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - string
                                              - 'null'
                                            format: date-time
                                            examples:
                                              - '2025-12-12 12:39:00'
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  allow_past_dates:
                                                    description: Indicates if this Custom Field support past dates
                                                    type: boolean
                                                    examples:
                                                      - false
                                                  allow_future_dates:
                                                    description: Indicates if this Custom Field support future dates
                                                    type: boolean
                                                    examples:
                                                      - true
                                      - type: object
                                        properties:
                                          id:
                                            description: The unique identifier for the Custom Field
                                            type: integer
                                            examples:
                                              - 123
                                          field_type:
                                            description: The type of the Custom Field
                                            type: string
                                            enum:
                                              - NUMBER
                                            examples:
                                              - NUMBER
                                          value:
                                            description: The current value of the Custom Field in this resource
                                            type:
                                              - integer
                                              - 'null'
                                            examples:
                                              - 12
                                          configs:
                                            type: object
                                            properties:
                                              label:
                                                description: The label for the Custom Field
                                                type: string
                                                examples:
                                                  - My field X
                                              code:
                                                description: The unique code for the Custom Field
                                                type: string
                                                examples:
                                                  - C01
                                              required:
                                                description: Specifies if the Custom Field is required
                                                type: boolean
                                                examples:
                                                  - true
                                              are_values_readonly:
                                                description: >-
                                                  Specifies if the Custom Field values are read only (so only
                                                  integrations can set them).
                                                type: boolean
                                                examples:
                                                  - false
                                              archived_at:
                                                description: >-
                                                  Indicates when the custom field was archived for this object type.
                                                  Objects that belong to the archived type will still display the custom
                                                  field value if it was configured before the archiving.
                                                type:
                                                  - string
                                                  - 'null'
                                                format: date-time
                                                examples:
                                                  - '2025-03-12 12:12:12'
                                              type_settings:
                                                description: The type settings for the Custom Field
                                                type: object
                                                properties:
                                                  min:
                                                    description: Indicates the minimum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 1
                                                  max:
                                                    description: Indicates the maximum value for the Custom Field
                                                    type:
                                                      - integer
                                                      - 'null'
                                                    examples:
                                                      - 3
                                    discriminator:
                                      propertyName: field_type
                        - title: Entity
                          description: Entity model structure details
                          type: object
                          properties:
                            id:
                              description: ID of the Supplier
                              type: string
                              examples:
                                - '1'
                              readOnly: true
                            type:
                              description: Model type
                              type: string
                              enum:
                                - entity
                              readOnly: true
                            attributes:
                              type: object
                              properties:
                                entity_id:
                                  type: integer
                                name:
                                  type: string
                                email:
                                  type: string
                                site:
                                  type: string
                                phone:
                                  type: string
                                cellphone:
                                  type: string
                                address:
                                  type: string
                                nib:
                                  type: string
                                nif:
                                  type: string
                                report_email:
                                  type: string
                                language:
                                  type: string
                                currency:
                                  type: string
                                license:
                                  type: string
                                  enum:
                                    - ASSISTANCE
                                    - CHURNED
                                    - COMPLEX
                                    - CSENTITY
                                    - DISTRIBUTED
                                    - HOTEL
                                    - NONE
                                    - PARTNER
                                    - PLACECHECKUP
                                profile_picture:
                                  type: string
                                entity_uuid:
                                  type: string
                                vat_rate:
                                  type: number
                                colour:
                                  type: string
                    uniqueItems: true
                  meta:
                    title: Meta
                    description: Meta model structure details
                    type: object
                    properties:
                      pagination:
                        type: object
                        properties:
                          total:
                            description: Total items.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          count:
                            description: Total items returned for the current page.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          per_page:
                            description: Maximum number of records per page.
                            type: integer
                            minimum: 1
                            default: 200
                            examples:
                              - 1
                          current_page:
                            description: Number of the current page.
                            type: integer
                            minimum: 1
                            default: 1
                          total_pages:
                            description: Number of the total pages.
                            type: integer
                            minimum: 1
                            default: 1
                        required:
                          - total
                          - count
                          - per_page
                          - current_page
                          - total_pages
                  links:
                    title: Response Links on listing operations
                    description: >-
                      Requests that return multiple items include a `links` attribute, with links related to request's
                      context.
                    type: object
                    properties:
                      self:
                        description: Current response link.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      first:
                        description: Link to the first page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      last:
                        description: Link to the previous page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      next:
                        description: Link to the next page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                    required:
                      - self
                      - first
                      - last
              examples:
                Example:
                  value:
                    data:
                      - type: warehouse
                        id: '15'
                        attributes:
                          warehouse_id: 15
                          entity_id: 12
                          name: Central Warehouse
                          code: AC
                          full_code: AC
                          is_real: false
                          observation: Main entrance through the blue gate.
                          address: Rua da Constituição, 346
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
      deprecated: true
  /warehouses/{warehouseId}:
    get:
      operationId: getWarehouse
      tags:
        - Warehouses
      summary: Get a Warehouse
      description: This endpoint allows you to get a specific Warehouse.
      parameters:
        - name: warehouseId
          in: path
          description: The unique identifier of the warehouse within the system. This ID is immutable and assigned upon creation.
          required: true
          schema:
            type: string
            examples:
              - '1'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: Warehouse
                    description: Detailed structure of a warehouse model.
                    type: object
                    properties:
                      id:
                        description: >-
                          The unique identifier of the warehouse within the system. This ID is immutable and assigned
                          upon creation.
                        type: string
                        examples:
                          - '1'
                        readOnly: true
                      type:
                        description: The resource type, identifying this as a warehouse.
                        type: string
                        enum:
                          - warehouse
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          warehouse_id:
                            description: >-
                              The unique identifier of the warehouse within the system. This ID is immutable and
                              assigned upon creation.
                            type: integer
                            examples:
                              - 1
                          entity_id:
                            description: >-
                              The identifier of the account (entity, organization, or client) that owns or manages this
                              warehouse.
                            type: integer
                            examples:
                              - 1
                            readOnly: true
                          name:
                            description: >-
                              The descriptive name of the warehouse, intended for readability and identification within
                              the application's user interface.
                            type: string
                            examples:
                              - Warehouse
                          code:
                            description: >-
                              A unique code assigned to the warehouse, intended for readability and identification
                              within the application's user interface.
                            type: string
                            examples:
                              - WZ1
                          full_code:
                            description: >-
                              A hierarchical code representing the complete lineage of the warehouse within the storage
                              structure. It's formed by concatenating the codes of all its parent warehouses or
                              sections, separated by a dot, followed by the warehouse's own code.
                            type: string
                            examples:
                              - WZ0.WZ1
                          parent_id:
                            description: >-
                              The identifier of the immediate parent warehouse or section in the storage hierarchy. If
                              this is a top-level warehouse, this field will be null.
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 2
                          is_real:
                            description: >-
                              A boolean flag indicating the nature of this storage item. `true` signifies a physical,
                              tangible warehouse location, while `false` represents a logical grouping or section within
                              a larger warehouse.
                            type: boolean
                          observation:
                            description: >-
                              Free-text field for any additional notes, specific instructions, or relevant details
                              pertaining to this warehouse.
                            type:
                              - string
                              - 'null'
                            examples:
                              - Operational hours from 9am to 7pm, entrance by the large door on the side.
                          address:
                            description: >-
                              The physical street address of the warehouse. This provides the geographical location of
                              the storage facility.
                            type:
                              - string
                              - 'null'
                            examples:
                              - Warehouse street, 10, Country
              examples:
                Example:
                  value:
                    data:
                      type: warehouse
                      id: '15'
                      attributes:
                        warehouse_id: 15
                        entity_id: 12
                        name: Central Warehouse
                        code: AC
                        full_code: AC
                        is_real: false
                        observation: Main entrance through the blue gate.
                        address: Rua da Constituição, 346
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
      deprecated: true
  /works:
    get:
      operationId: getWorks
      tags:
        - Works
      summary: List all Works
      description: |
        Planned Jobs are refered in Infraspeak's API as Works.

        This endpoint allows you to obtain all the Works (Planned Jobs).
      parameters:
        - name: expanded
          in: query
          description: Available expands for the Works
          schema:
            type: string
            enum:
              - client
              - costCenter
              - entity
              - events
              - eventsPlanned
              - failure
              - files
              - firstWorkScheduled
              - gatekeeper
              - gatekeeperNotifications
              - interventions
              - lastWorkScheduled
              - locals
              - locations
              - previousWorkScheduled
              - nextWorkScheduled
              - ongoingWorkScheduled
              - operators
              - responsibles
              - supplier
              - technicalSkills
              - workInterventions
              - workMaintenanceProcedures
              - workNetwork
              - workPeriodicity
              - workReminderRules
              - workSchedules
              - workSlaRules
              - workType
              - workUsageTrigger
              - workAutoSchedule
              - workNotifications
              - template
        - name: limit
          in: query
          description: Limit of records per page
          schema:
            type: integer
        - name: page
          in: query
          description: Current Page number
          schema:
            type: integer
        - name: sort
          in: query
          description: Sort the results by a specific field. The field can be suffixed with '-' to sort in descending order.
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      title: Work
                      description: structure details of Work model
                      type: object
                      properties:
                        id:
                          description: ID of the planned job
                          type: string
                          readOnly: true
                        type:
                          description: Model type
                          type: string
                          enum:
                            - work
                          readOnly: true
                        attributes:
                          type: object
                          properties:
                            calendar_id:
                              description: ID for the Calendar
                              type:
                                - integer
                                - 'null'
                              examples:
                                - 259
                            description:
                              description: Description of the planned job
                              type:
                                - string
                                - 'null'
                              examples:
                                - PMP description
                            type:
                              description: Type of the planned job. Null if the Planned Job is related to a Work Order (failure)
                              type:
                                - string
                                - 'null'
                              enum:
                                - CYCLIC
                                - PLAN
                                - SPECIAL
                            any_responsible:
                              type: boolean
                            auto_close:
                              description: >-
                                Indication if the planned job order can be automatically closed, when all tasks are
                                completed
                              type: boolean
                              examples:
                                - false
                            auto_pilot:
                              description: Indication if any user can start this planned job
                              type: boolean
                              examples:
                                - false
                            client_id:
                              description: ID of the Client
                              type: integer
                              examples:
                                - 22349
                            cost_center_id:
                              description: ID of the Cost Center
                              type:
                                - integer
                                - 'null'
                              examples:
                                - 17
                            entity_id:
                              description: ID of the Entity
                              type: integer
                              examples:
                                - 12
                            failure_id:
                              description: ID of the Work Order
                              type:
                                - integer
                                - 'null'
                              examples:
                                - 1448321
                            gatekeeper_id:
                              description: ID for the Gatekeeper
                              type:
                                - integer
                                - 'null'
                              examples:
                                - 159
                            is_protected:
                              description: Protect Planned Job from Manager edition / deletion
                              type:
                                - boolean
                                - 'null'
                              examples:
                                - true
                            name:
                              description: Description of the planned job
                              type: string
                              examples:
                                - PMP HVAC
                            network_work_id:
                              description: ID used to reference a shared Planned Job
                              type: integer
                              examples:
                                - 123
                            periodicity:
                              description: >-
                                Description of the Planned Job periodicity. Null if the Planned Job is related to a Work
                                Order (failure)
                              type:
                                - string
                                - 'null'
                              examples:
                                - Plano de 1 ano, com visita em Setembro
                            recurrence:
                              description: >-
                                Information about the Planned Job recurrence. Null if the Planned Job is related to a
                                Work Order (failure)
                              type:
                                - object
                                - 'null'
                              properties:
                                DTSTART:
                                  type: string
                                  format: date-time
                                  examples:
                                    - '2022-04-01 09:00:00'
                            supplier_id:
                              description: ID of the Supplier
                              type:
                                - integer
                                - 'null'
                              examples:
                                - 54
                            work_id:
                              description: ID of the planned job
                              type: integer
                            work_type_id:
                              description: ID of the Planned Job Type
                              type: integer
                              examples:
                                - 448
                        relationships:
                          type: object
                          description: The relationships of the Work (Only present when expanded in the request)
                          properties:
                            networkStatus:
                              type: object
                              properties:
                                data:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - SENDER
                                          - RECEIVER
                                        readOnly: true
                                        description: >-
                                          If RECEIVER the Work was received on Network, if SENDER the Work was sent to
                                          the Network.
                                      id:
                                        type: string
                                        readOnly: true
                                      shared:
                                        type: boolean
                                        readOnly: true
                                        description: If the Work is actively shared on Network.
                                      in_sync:
                                        type: boolean
                                        readOnly: true
                                        description: If the Work is in sync of execution with the Network.
                                      action:
                                        type: string
                                        readOnly: true
                                        description: If UNSHARED, the Work was unshared from Network, if null, no action was taken.
                                      network_entity_uuid:
                                        type: string
                                        readOnly: true
                                        description: The UUID of the Network Entity related to the Work network status.
                                      network_relation_id:
                                        type: integer
                                        readOnly: true
                                        description: >-
                                          The ID of the Network Relation related to the Work network status. It can be
                                          from a Client or a Supplier.
                                      network_relation_type:
                                        type: string
                                        enum:
                                          - CLIENT
                                          - SUPPLIER
                                        readOnly: true
                                        description: >-
                                          The type of Network Relation related to the Work network status. It can be
                                          from a Client or a Supplier, used to identify the relation ID and the relation
                                          the Network Entity has to the Work.
                  meta:
                    title: Meta
                    description: Meta model structure details
                    type: object
                    properties:
                      pagination:
                        type: object
                        properties:
                          total:
                            description: Total items.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          count:
                            description: Total items returned for the current page.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          per_page:
                            description: Maximum number of records per page.
                            type: integer
                            minimum: 1
                            default: 200
                            examples:
                              - 1
                          current_page:
                            description: Number of the current page.
                            type: integer
                            minimum: 1
                            default: 1
                          total_pages:
                            description: Number of the total pages.
                            type: integer
                            minimum: 1
                            default: 1
                        required:
                          - total
                          - count
                          - per_page
                          - current_page
                          - total_pages
                  links:
                    title: Response Links on listing operations
                    description: >-
                      Requests that return multiple items include a `links` attribute, with links related to request's
                      context.
                    type: object
                    properties:
                      self:
                        description: Current response link.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      first:
                        description: Link to the first page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      last:
                        description: Link to the previous page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      next:
                        description: Link to the next page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                    required:
                      - self
                      - first
                      - last
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
    post:
      operationId: createWork
      tags:
        - Works
      summary: Create a new Work
      description: |
        Planned Jobs are refered in Infraspeak's API as Works.

        This endpoint allows you to create a new Work (Planned Job).
      requestBody:
        content:
          application/json:
            schema:
              description: Work POST payload
              type: object
              properties:
                description:
                  description: Description of the planned job
                  type:
                    - string
                    - 'null'
                type:
                  description: Type of the Planned Job
                  type: string
                  enum:
                    - CYCLIC
                    - PLAN
                    - SPECIAL
                _type:
                  type: string
                  enum:
                    - works
                any_responsible:
                  description: >-
                    If true anyone can start the planned job, if false `operator_id` or `technical_skill_id` must be
                    filled
                  type: boolean
                auto_close:
                  description: >-
                    Indication if the planned job order can be automatically closed, when all tasks are completed. Used
                    only when `type` is "CYCLIC" or "PLAN".
                  type: boolean
                  default: false
                auto_pilot:
                  description: Indication if any user can start this planned job. Used only when `type` is "CYCLIC" or "PLAN".
                  type: boolean
                  default: false
                auto_schedule:
                  description: Information for automatically scheduling events for the Planned Job
                  type: array
                  items:
                    type: object
                    properties:
                      is_enabled:
                        description: Enables auto schedule
                        type: boolean
                      start_time:
                        description: The start time for scheduling Events in 24-hour format (HH:mm)
                        type: string
                        examples:
                          - '10:00'
                      end_time:
                        description: The end time for scheduling Events in 24-hour format (HH:mm)
                        type: string
                        examples:
                          - '11:00'
                      operators:
                        description: IDs of the operators assigned to the events
                        type: array
                        items:
                          type: integer
                    required:
                      - start_time
                      - end_time
                      - operators
                calendar_id:
                  description: ID of the Calendar. Required when `type` is "CYCLIC" and `recurrence.FREQ` is "HOURLY".
                  type: integer
                client_id:
                  description: ID of the Client
                  type: integer
                cost_center_id:
                  description: ID of the Cost Center
                  type:
                    - integer
                    - 'null'
                failure_id:
                  description: ID of the Failure
                  type:
                    - integer
                    - 'null'
                gatekeeper_id:
                  description: ID of the Gatekeeper
                  type: integer
                gatekeeper_notification:
                  description: ID of operators to receive the Gatekeeper Notification
                  type: array
                  items:
                    type: integer
                interventions:
                  description: List of interventions to be performed. Required when `type` is "CYCLIC" or "PLAN".
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: integer
                      elements:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                is_protected:
                  description: Protect Planned Job from Manager edition / deletion
                  type: boolean
                local_id:
                  description: ID's of the locations associated to the planned job
                  type: array
                  items:
                    type: integer
                name:
                  description: Brief description of the planned job
                  type: string
                operator_id:
                  description: ID's of Operators associated to the planned job
                  type: array
                  items:
                    type: integer
                procedures:
                  description: List with Procedure objects. Only used when `type` is "SPECIAL".
                  type: array
                  items:
                    type: object
                    properties:
                      task:
                        description: Name of the task to be performed
                        type: string
                      quantity:
                        type: number
                        minimum: 1
                      unit:
                        description: The measure unit of the `quantity`
                        type: string
                recurrence:
                  description: Information about the recurrence
                  type: object
                  properties:
                    DTSTART:
                      description: Start date and time for the Planned Job
                      type: string
                      format: date-time
                      examples:
                        - '2022-05-29T17:32:28'
                    UNTIL:
                      description: End date and time for the Planned Job
                      type: string
                      format: date-time
                      examples:
                        - '2022-05-30T17:32:28'
                    FREQ:
                      description: Type of frequency of the recurrence.
                      type: string
                      enum:
                        - HOURLY
                        - DAILY
                        - WEEKLY
                        - MONTHLY
                        - YEARLY
                        - UBM
                    INTERVAL:
                      description: >-
                        Interval unit of the recurrence, greater or equal than 0. Required if type is "CYCLIC" and FREQ
                        is HOURLY.
                      type: number
                      minimum: 0
                reminder_rules:
                  description: List with reminder rules objects
                  type: array
                  items:
                    type: object
                    properties:
                      calendar_id:
                        type: integer
                      notes:
                        type: string
                      notify_hours:
                        type: integer
                      notify_client_contacts:
                        type: boolean
                      notify_building_contacts:
                        type: boolean
                      notify_contacts:
                        type: array
                        items:
                          type: integer
                sla_rules:
                  description: List of SLA rules associated to the planned job
                  type: array
                  items:
                    type: object
                    properties:
                      calendar_id:
                        type: string
                      notify_hours:
                        type:
                          - integer
                          - 'null'
                      pausable:
                        type: boolean
                      start_status:
                        type: string
                        examples:
                          - SCHEDULED
                      target_hours:
                        type: integer
                      target_status:
                        type: string
                        examples:
                          - COMPLETED
                      specify_pause_reason:
                        description: Whether pause reasons must be specified for this SLA rule
                        type: boolean
                      pause_reasons:
                        description: >-
                          List of pause reasons for this SLA rule. There should be at least one pause reason selected if
                          specify_pause_reason is true.
                        type:
                          - array
                        items:
                          type: string
                        minItems: 1
                sla_rules_receivers:
                  description: Who should receive notifications for SLA rules
                  type: array
                  items:
                    type: object
                    properties:
                      notify_client_building_responsibles:
                        type: boolean
                      notify_work_responsibles:
                        type: boolean
                      operators:
                        type: array
                        items:
                          type: integer
                supplier_id:
                  description: ID of the Supplier
                  type:
                    - integer
                    - 'null'
                technical_skill_id:
                  description: ID's of Technical Skills associated to the planned job
                  type: array
                  items:
                    type: integer
                work_notifications:
                  description: List with Work Notifications
                  type: array
                  items:
                    type: object
                    properties:
                      trigger:
                        description: The condition when the notification should be sent
                        type: string
                        enum:
                          - CLOSE
                          - CONFIRM
                      client_contacts:
                        description: Whether to notify client associated contacts
                        type: boolean
                      building_contacts:
                        description: Whether to notify building associated contacts
                        type: boolean
                      specific_contacts:
                        description: IDs of specific contacts to notify
                        type: array
                        items:
                          type: integer
                      client_operators:
                        description: Whether to notify client associated operators
                        type: boolean
                      building_operators:
                        description: Whether to notify building associated operators
                        type: boolean
                      technical_skill_operators:
                        description: Whether to notify operators (technician) with the associated technical skill
                        type: boolean
                      specific_operators:
                        description: IDs of specific operators to notify
                        type: array
                        items:
                          type: integer
                work_type_id:
                  description: ID of the WorkType
                  type: integer
              required:
                - _type
                - type
                - name
                - work_type_id
                - local_id
                - client_id
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      title: Work
                      description: structure details of Work model
                      type: object
                      properties:
                        id:
                          description: ID of the planned job
                          type: string
                          readOnly: true
                        type:
                          description: Model type
                          type: string
                          enum:
                            - work
                          readOnly: true
                        attributes:
                          type: object
                          properties:
                            calendar_id:
                              description: ID for the Calendar
                              type:
                                - integer
                                - 'null'
                              examples:
                                - 259
                            description:
                              description: Description of the planned job
                              type:
                                - string
                                - 'null'
                              examples:
                                - PMP description
                            type:
                              description: Type of the planned job. Null if the Planned Job is related to a Work Order (failure)
                              type:
                                - string
                                - 'null'
                              enum:
                                - CYCLIC
                                - PLAN
                                - SPECIAL
                            any_responsible:
                              type: boolean
                            auto_close:
                              description: >-
                                Indication if the planned job order can be automatically closed, when all tasks are
                                completed
                              type: boolean
                              examples:
                                - false
                            auto_pilot:
                              description: Indication if any user can start this planned job
                              type: boolean
                              examples:
                                - false
                            client_id:
                              description: ID of the Client
                              type: integer
                              examples:
                                - 22349
                            cost_center_id:
                              description: ID of the Cost Center
                              type:
                                - integer
                                - 'null'
                              examples:
                                - 17
                            entity_id:
                              description: ID of the Entity
                              type: integer
                              examples:
                                - 12
                            failure_id:
                              description: ID of the Work Order
                              type:
                                - integer
                                - 'null'
                              examples:
                                - 1448321
                            gatekeeper_id:
                              description: ID for the Gatekeeper
                              type:
                                - integer
                                - 'null'
                              examples:
                                - 159
                            is_protected:
                              description: Protect Planned Job from Manager edition / deletion
                              type:
                                - boolean
                                - 'null'
                              examples:
                                - true
                            name:
                              description: Description of the planned job
                              type: string
                              examples:
                                - PMP HVAC
                            network_work_id:
                              description: ID used to reference a shared Planned Job
                              type: integer
                              examples:
                                - 123
                            periodicity:
                              description: >-
                                Description of the Planned Job periodicity. Null if the Planned Job is related to a Work
                                Order (failure)
                              type:
                                - string
                                - 'null'
                              examples:
                                - Plano de 1 ano, com visita em Setembro
                            recurrence:
                              description: >-
                                Information about the Planned Job recurrence. Null if the Planned Job is related to a
                                Work Order (failure)
                              type:
                                - object
                                - 'null'
                              properties:
                                DTSTART:
                                  type: string
                                  format: date-time
                                  examples:
                                    - '2022-04-01 09:00:00'
                            supplier_id:
                              description: ID of the Supplier
                              type:
                                - integer
                                - 'null'
                              examples:
                                - 54
                            work_id:
                              description: ID of the planned job
                              type: integer
                            work_type_id:
                              description: ID of the Planned Job Type
                              type: integer
                              examples:
                                - 448
                        relationships:
                          type: object
                          description: The relationships of the Work (Only present when expanded in the request)
                          properties:
                            networkStatus:
                              type: object
                              properties:
                                data:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - SENDER
                                          - RECEIVER
                                        readOnly: true
                                        description: >-
                                          If RECEIVER the Work was received on Network, if SENDER the Work was sent to
                                          the Network.
                                      id:
                                        type: string
                                        readOnly: true
                                      shared:
                                        type: boolean
                                        readOnly: true
                                        description: If the Work is actively shared on Network.
                                      in_sync:
                                        type: boolean
                                        readOnly: true
                                        description: If the Work is in sync of execution with the Network.
                                      action:
                                        type: string
                                        readOnly: true
                                        description: If UNSHARED, the Work was unshared from Network, if null, no action was taken.
                                      network_entity_uuid:
                                        type: string
                                        readOnly: true
                                        description: The UUID of the Network Entity related to the Work network status.
                                      network_relation_id:
                                        type: integer
                                        readOnly: true
                                        description: >-
                                          The ID of the Network Relation related to the Work network status. It can be
                                          from a Client or a Supplier.
                                      network_relation_type:
                                        type: string
                                        enum:
                                          - CLIENT
                                          - SUPPLIER
                                        readOnly: true
                                        description: >-
                                          The type of Network Relation related to the Work network status. It can be
                                          from a Client or a Supplier, used to identify the relation ID and the relation
                                          the Network Entity has to the Work.
                  meta:
                    title: Meta
                    description: Meta model structure details
                    type: object
                    properties:
                      pagination:
                        type: object
                        properties:
                          total:
                            description: Total items.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          count:
                            description: Total items returned for the current page.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          per_page:
                            description: Maximum number of records per page.
                            type: integer
                            minimum: 1
                            default: 200
                            examples:
                              - 1
                          current_page:
                            description: Number of the current page.
                            type: integer
                            minimum: 1
                            default: 1
                          total_pages:
                            description: Number of the total pages.
                            type: integer
                            minimum: 1
                            default: 1
                        required:
                          - total
                          - count
                          - per_page
                          - current_page
                          - total_pages
                  links:
                    title: Response Links on listing operations
                    description: >-
                      Requests that return multiple items include a `links` attribute, with links related to request's
                      context.
                    type: object
                    properties:
                      self:
                        description: Current response link.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      first:
                        description: Link to the first page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      last:
                        description: Link to the previous page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      next:
                        description: Link to the next page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                    required:
                      - self
                      - first
                      - last
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /works/{workId}:
    get:
      operationId: getWork
      tags:
        - Works
      summary: Get a Work
      description: |
        Planned Jobs are refered in Infraspeak's API as Works.

        This endpoint allows you to get information about a specific Work (Planned Job).
      parameters:
        - name: workId
          in: path
          description: The Work ID
          required: true
          schema:
            type: string
            examples:
              - '123'
        - name: expanded
          in: query
          description: Available expands for the Works
          schema:
            type: string
            enum:
              - client
              - costCenter
              - entity
              - events
              - eventsPlanned
              - failure
              - files
              - firstWorkScheduled
              - gatekeeper
              - gatekeeperNotifications
              - interventions
              - lastWorkScheduled
              - locals
              - locations
              - previousWorkScheduled
              - nextWorkScheduled
              - ongoingWorkScheduled
              - operators
              - responsibles
              - supplier
              - technicalSkills
              - workInterventions
              - workMaintenanceProcedures
              - workNetwork
              - workPeriodicity
              - workReminderRules
              - workSchedules
              - workSlaRules
              - workType
              - workUsageTrigger
              - workAutoSchedule
              - workNotifications
              - template
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: Work
                    description: structure details of Work model
                    type: object
                    properties:
                      id:
                        description: ID of the planned job
                        type: string
                        readOnly: true
                      type:
                        description: Model type
                        type: string
                        enum:
                          - work
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          calendar_id:
                            description: ID for the Calendar
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 259
                          description:
                            description: Description of the planned job
                            type:
                              - string
                              - 'null'
                            examples:
                              - PMP description
                          type:
                            description: Type of the planned job. Null if the Planned Job is related to a Work Order (failure)
                            type:
                              - string
                              - 'null'
                            enum:
                              - CYCLIC
                              - PLAN
                              - SPECIAL
                          any_responsible:
                            type: boolean
                          auto_close:
                            description: >-
                              Indication if the planned job order can be automatically closed, when all tasks are
                              completed
                            type: boolean
                            examples:
                              - false
                          auto_pilot:
                            description: Indication if any user can start this planned job
                            type: boolean
                            examples:
                              - false
                          client_id:
                            description: ID of the Client
                            type: integer
                            examples:
                              - 22349
                          cost_center_id:
                            description: ID of the Cost Center
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 17
                          entity_id:
                            description: ID of the Entity
                            type: integer
                            examples:
                              - 12
                          failure_id:
                            description: ID of the Work Order
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 1448321
                          gatekeeper_id:
                            description: ID for the Gatekeeper
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 159
                          is_protected:
                            description: Protect Planned Job from Manager edition / deletion
                            type:
                              - boolean
                              - 'null'
                            examples:
                              - true
                          name:
                            description: Description of the planned job
                            type: string
                            examples:
                              - PMP HVAC
                          network_work_id:
                            description: ID used to reference a shared Planned Job
                            type: integer
                            examples:
                              - 123
                          periodicity:
                            description: >-
                              Description of the Planned Job periodicity. Null if the Planned Job is related to a Work
                              Order (failure)
                            type:
                              - string
                              - 'null'
                            examples:
                              - Plano de 1 ano, com visita em Setembro
                          recurrence:
                            description: >-
                              Information about the Planned Job recurrence. Null if the Planned Job is related to a Work
                              Order (failure)
                            type:
                              - object
                              - 'null'
                            properties:
                              DTSTART:
                                type: string
                                format: date-time
                                examples:
                                  - '2022-04-01 09:00:00'
                          supplier_id:
                            description: ID of the Supplier
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 54
                          work_id:
                            description: ID of the planned job
                            type: integer
                          work_type_id:
                            description: ID of the Planned Job Type
                            type: integer
                            examples:
                              - 448
                      relationships:
                        type: object
                        description: The relationships of the Work (Only present when expanded in the request)
                        properties:
                          networkStatus:
                            type: object
                            properties:
                              data:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - SENDER
                                        - RECEIVER
                                      readOnly: true
                                      description: >-
                                        If RECEIVER the Work was received on Network, if SENDER the Work was sent to the
                                        Network.
                                    id:
                                      type: string
                                      readOnly: true
                                    shared:
                                      type: boolean
                                      readOnly: true
                                      description: If the Work is actively shared on Network.
                                    in_sync:
                                      type: boolean
                                      readOnly: true
                                      description: If the Work is in sync of execution with the Network.
                                    action:
                                      type: string
                                      readOnly: true
                                      description: If UNSHARED, the Work was unshared from Network, if null, no action was taken.
                                    network_entity_uuid:
                                      type: string
                                      readOnly: true
                                      description: The UUID of the Network Entity related to the Work network status.
                                    network_relation_id:
                                      type: integer
                                      readOnly: true
                                      description: >-
                                        The ID of the Network Relation related to the Work network status. It can be
                                        from a Client or a Supplier.
                                    network_relation_type:
                                      type: string
                                      enum:
                                        - CLIENT
                                        - SUPPLIER
                                      readOnly: true
                                      description: >-
                                        The type of Network Relation related to the Work network status. It can be from
                                        a Client or a Supplier, used to identify the relation ID and the relation the
                                        Network Entity has to the Work.
        '401':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
    patch:
      operationId: updateWork
      tags:
        - Works
      summary: Update a Work
      description: |
        Planned Jobs are refered in Infraspeak's API as Works.

        This endpoint allows you to update a Work (Planned Job).
      parameters:
        - name: workId
          in: path
          description: The Work ID
          required: true
          schema:
            type: string
            examples:
              - '123'
      requestBody:
        content:
          application/json:
            schema:
              description: Work PATCH payload
              type: object
              properties:
                description:
                  description: Description of the planned job
                  type:
                    - string
                    - 'null'
                type:
                  description: Type of the Planned Job
                  type: string
                  enum:
                    - CYCLIC
                    - PLAN
                    - SPECIAL
                _type:
                  type: string
                  enum:
                    - works
                any_responsible:
                  description: >-
                    If true anyone can start the planned job, if false `operator_id` or `technical_skill_id` must be
                    filled
                  type: boolean
                auto_close:
                  description: >-
                    Indication if the planned job order can be automatically closed, when all tasks are completed. Used
                    only when `type` is "CYCLIC" or "PLAN".
                  type: boolean
                  default: false
                auto_pilot:
                  description: Indication if any user can start this planned job. Used only when `type` is "CYCLIC" or "PLAN".
                  type: boolean
                  default: false
                auto_schedule:
                  description: Information for automatically scheduling events for the Planned Job
                  type: array
                  items:
                    type: object
                    properties:
                      is_enabled:
                        description: Enables auto schedule
                        type: boolean
                      start_time:
                        description: The start time for scheduling Events in 24-hour format (HH:mm)
                        type: string
                        examples:
                          - '10:00'
                      end_time:
                        description: The end time for scheduling Events in 24-hour format (HH:mm)
                        type: string
                        examples:
                          - '11:00'
                      operators:
                        description: IDs of the operators assigned to the events
                        type: array
                        items:
                          type: integer
                    required:
                      - start_time
                      - end_time
                      - operators
                calendar_id:
                  description: ID of the Calendar. Required when `type` is "CYCLIC" and `recurrence.FREQ` is "HOURLY".
                  type: integer
                client_id:
                  description: ID of the Client
                  type: integer
                cost_center_id:
                  description: ID of the Cost Center
                  type:
                    - integer
                    - 'null'
                gatekeeper_id:
                  description: ID of the Gatekeeper
                  type: integer
                gatekeeper_notification:
                  description: ID of operators to receive the Gatekeeper Notification
                  type: array
                  items:
                    type: integer
                interventions:
                  description: List of interventions to be performed. Required when `type` is "CYCLIC" or "PLAN".
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: integer
                      elements:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                is_protected:
                  description: Protect Planned Job from Manager edition / deletion
                  type: boolean
                local_id:
                  description: ID's of the locations associated to the planned job
                  type: array
                  items:
                    type: integer
                name:
                  description: Brief description of the planned job
                  type: string
                operator_id:
                  description: ID's of Operators associated to the planned job
                  type: array
                  items:
                    type: integer
                procedures:
                  description: List with Procedure objects. Only used when `type` is "SPECIAL".
                  type: array
                  items:
                    type: object
                    properties:
                      task:
                        description: Name of the task to be performed
                        type: string
                      quantity:
                        type: number
                        minimum: 1
                      unit:
                        description: The measure unit of the `quantity`
                        type: string
                recurrence:
                  description: Information about the recurrence
                  type: object
                  properties:
                    DTSTART:
                      description: Start date and time for the Planned Job
                      type: string
                      format: date-time
                      examples:
                        - '2022-05-29T17:32:28'
                    UNTIL:
                      description: End date and time for the Planned Job
                      type: string
                      format: date-time
                      examples:
                        - '2022-05-30T17:32:28'
                    FREQ:
                      description: Type of frequency of the recurrence.
                      type: string
                      enum:
                        - HOURLY
                        - DAILY
                        - WEEKLY
                        - MONTHLY
                        - YEARLY
                        - UBM
                    INTERVAL:
                      description: >-
                        Interval unit of the recurrence, greater or equal than 0. Required if type is "CYCLIC" and FREQ
                        is HOURLY.
                      type: number
                      minimum: 0
                reminder_rules:
                  description: List with reminder rules objects
                  type: array
                  items:
                    type: object
                    properties:
                      calendar_id:
                        type: integer
                      notes:
                        type: string
                      notify_hours:
                        type: integer
                      notify_client_contacts:
                        type: boolean
                      notify_building_contacts:
                        type: boolean
                      notify_contacts:
                        type: array
                        items:
                          type: integer
                sla_rules:
                  description: List of SLA rules associated to the planned job
                  type: array
                  items:
                    type: object
                    properties:
                      calendar_id:
                        type: string
                      notify_hours:
                        type:
                          - integer
                          - 'null'
                      pausable:
                        type: boolean
                      start_status:
                        type: string
                        examples:
                          - SCHEDULED
                      target_hours:
                        type: integer
                      target_status:
                        type: string
                        examples:
                          - COMPLETED
                sla_rules_receivers:
                  description: Who should receive notifications for SLA rules
                  type: array
                  items:
                    type: object
                    properties:
                      notify_client_building_responsibles:
                        type: boolean
                      notify_work_responsibles:
                        type: boolean
                      operators:
                        type: array
                        items:
                          type: integer
                supplier_id:
                  description: ID of the Supplier
                  type:
                    - integer
                    - 'null'
                technical_skill_id:
                  description: ID's of Technical Skills associated to the planned job
                  type: array
                  items:
                    type: integer
                work_notifications:
                  description: List with Work Notifications
                  type: array
                  items:
                    type: object
                    properties:
                      trigger:
                        description: The condition when the notification should be sent
                        type: string
                        enum:
                          - CLOSE
                          - CONFIRM
                      client_contacts:
                        description: Whether to notify client associated contacts
                        type: boolean
                      building_contacts:
                        description: Whether to notify building associated contacts
                        type: boolean
                      specific_contacts:
                        description: IDs of specific contacts to notify
                        type: array
                        items:
                          type: integer
                      client_operators:
                        description: Whether to notify client associated operators
                        type: boolean
                      building_operators:
                        description: Whether to notify building associated operators
                        type: boolean
                      technical_skill_operators:
                        description: Whether to notify operators (technician) with the associated technical skill
                        type: boolean
                      specific_operators:
                        description: IDs of specific operators to notify
                        type: array
                        items:
                          type: integer
                work_type_id:
                  description: ID of the WorkType
                  type: integer
              required:
                - _type
                - type
                - name
                - work_type_id
                - local_id
                - client_id
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: Work
                    description: structure details of Work model
                    type: object
                    properties:
                      id:
                        description: ID of the planned job
                        type: string
                        readOnly: true
                      type:
                        description: Model type
                        type: string
                        enum:
                          - work
                        readOnly: true
                      attributes:
                        type: object
                        properties:
                          calendar_id:
                            description: ID for the Calendar
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 259
                          description:
                            description: Description of the planned job
                            type:
                              - string
                              - 'null'
                            examples:
                              - PMP description
                          type:
                            description: Type of the planned job. Null if the Planned Job is related to a Work Order (failure)
                            type:
                              - string
                              - 'null'
                            enum:
                              - CYCLIC
                              - PLAN
                              - SPECIAL
                          any_responsible:
                            type: boolean
                          auto_close:
                            description: >-
                              Indication if the planned job order can be automatically closed, when all tasks are
                              completed
                            type: boolean
                            examples:
                              - false
                          auto_pilot:
                            description: Indication if any user can start this planned job
                            type: boolean
                            examples:
                              - false
                          client_id:
                            description: ID of the Client
                            type: integer
                            examples:
                              - 22349
                          cost_center_id:
                            description: ID of the Cost Center
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 17
                          entity_id:
                            description: ID of the Entity
                            type: integer
                            examples:
                              - 12
                          failure_id:
                            description: ID of the Work Order
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 1448321
                          gatekeeper_id:
                            description: ID for the Gatekeeper
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 159
                          is_protected:
                            description: Protect Planned Job from Manager edition / deletion
                            type:
                              - boolean
                              - 'null'
                            examples:
                              - true
                          name:
                            description: Description of the planned job
                            type: string
                            examples:
                              - PMP HVAC
                          network_work_id:
                            description: ID used to reference a shared Planned Job
                            type: integer
                            examples:
                              - 123
                          periodicity:
                            description: >-
                              Description of the Planned Job periodicity. Null if the Planned Job is related to a Work
                              Order (failure)
                            type:
                              - string
                              - 'null'
                            examples:
                              - Plano de 1 ano, com visita em Setembro
                          recurrence:
                            description: >-
                              Information about the Planned Job recurrence. Null if the Planned Job is related to a Work
                              Order (failure)
                            type:
                              - object
                              - 'null'
                            properties:
                              DTSTART:
                                type: string
                                format: date-time
                                examples:
                                  - '2022-04-01 09:00:00'
                          supplier_id:
                            description: ID of the Supplier
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 54
                          work_id:
                            description: ID of the planned job
                            type: integer
                          work_type_id:
                            description: ID of the Planned Job Type
                            type: integer
                            examples:
                              - 448
                      relationships:
                        type: object
                        description: The relationships of the Work (Only present when expanded in the request)
                        properties:
                          networkStatus:
                            type: object
                            properties:
                              data:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - SENDER
                                        - RECEIVER
                                      readOnly: true
                                      description: >-
                                        If RECEIVER the Work was received on Network, if SENDER the Work was sent to the
                                        Network.
                                    id:
                                      type: string
                                      readOnly: true
                                    shared:
                                      type: boolean
                                      readOnly: true
                                      description: If the Work is actively shared on Network.
                                    in_sync:
                                      type: boolean
                                      readOnly: true
                                      description: If the Work is in sync of execution with the Network.
                                    action:
                                      type: string
                                      readOnly: true
                                      description: If UNSHARED, the Work was unshared from Network, if null, no action was taken.
                                    network_entity_uuid:
                                      type: string
                                      readOnly: true
                                      description: The UUID of the Network Entity related to the Work network status.
                                    network_relation_id:
                                      type: integer
                                      readOnly: true
                                      description: >-
                                        The ID of the Network Relation related to the Work network status. It can be
                                        from a Client or a Supplier.
                                    network_relation_type:
                                      type: string
                                      enum:
                                        - CLIENT
                                        - SUPPLIER
                                      readOnly: true
                                      description: >-
                                        The type of Network Relation related to the Work network status. It can be from
                                        a Client or a Supplier, used to identify the relation ID and the relation the
                                        Network Entity has to the Work.
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '403':
          description: Forbidden. The action can not be fulfilled.
          content:
            application/json:
              schema:
                title: 403 Forbidden
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 403
                      message:
                        type: string
                        examples:
                          - Action unauthorized
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 403
                      message: Action unauthorized
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /works/scheduled:
    get:
      operationId: getScheduledWorks
      tags:
        - Scheduled Works
      summary: List all Scheduled Works
      description: |
        Planned Job Orders are referred in Infraspeak's API as Scheduled Works.

        This endpoint allows you to fetch all the Scheduled Work (Planned Job Orders).
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      title: Scheduled Work
                      description: Scheduled Order model structure details
                      type: object
                      properties:
                        id:
                          description: ID of the Scheduled Order
                          type: string
                          readOnly: true
                          examples:
                            - '123'
                        type:
                          description: Model type
                          type: string
                          enum:
                            - scheduled_work
                          readOnly: true
                          examples:
                            - scheduled_work
                        attributes:
                          type: object
                          properties:
                            entity_id:
                              description: The ID of the Entity where the Scheduled Work belongs.
                              type: integer
                              examples:
                                - 123
                            complete_date:
                              description: The datetime when the Scheduled Work was completed
                              type:
                                - string
                                - 'null'
                              format: date-time
                              examples:
                                - '2014-09-01 02:22:00'
                            cost_center_name:
                              description: The name of the Cost Center associated with the Scheduled Work.
                              type:
                                - string
                                - 'null'
                              examples:
                                - abc
                            completed_by_id:
                              description: The ID of the Operator that completed the Scheduled Work.
                              type:
                                - integer
                                - 'null'
                              examples:
                                - 123
                            completed_percentage:
                              description: The percentage of the Scheduled Work that is completed.
                              type: integer
                              examples:
                                - 45
                            completed_date:
                              description: The datetime when the Scheduled Work was completed
                              type:
                                - string
                                - 'null'
                              format: date-time
                              examples:
                                - '2014-09-01 02:22:00'
                            confirmed:
                              description: Indicates if the Scheduled Work is confirmed.
                              type: boolean
                              examples:
                                - true
                            failure_id:
                              description: >-
                                The ID of the Failure / Work Order associated with the Scheduled Work (Only if the
                                Scheduled work originated from a Failure / Work Order)
                              type:
                                - integer
                                - 'null'
                            last_status_change_date:
                              description: The datetime when the Scheduled Work status changed for the last time
                              type:
                                - string
                                - 'null'
                              format: date-time
                              examples:
                                - '2014-09-01 02:22:00'
                            last_status_change_operator:
                              description: The name of the Operator that changed the Scheduled Work status for the last time
                              type:
                                - string
                                - 'null'
                              examples:
                                - John
                            manpower_duration:
                              description: The total manpower duration of the Scheduled work in ISO-8601 duration format.
                              type:
                                - string
                                - 'null'
                              examples:
                                - P0Y0M0DT0H1M19S
                            manpower_cost:
                              description: The total manpower cost of the Scheduled work in the currency of the logged in user.
                              type:
                                - number
                                - 'null'
                              examples:
                                - 12.5
                            observation:
                              description: Observations added to the Scheduled Work.
                              type:
                                - string
                                - 'null'
                              examples:
                                - abc
                            real_start_date:
                              description: >-
                                The datetime when the Scheduled Work was actually started (not to confuse with the
                                datetime when the Scheduled work planned to start)
                              type:
                                - string
                                - 'null'
                              format: date-time
                              examples:
                                - '2014-09-01 02:22:00'
                            running:
                              description: Indicates if the Scheduled Work is currently in a running status
                              type: boolean
                              examples:
                                - true
                            schedule_work_id:
                              description: The ID of the Scheduled Work
                              type: integer
                              examples:
                                - 123
                            signature_status:
                              description: Indicates if the Scheduled Work is signed by a responsible.
                              type: string
                              enum:
                                - NOT_SIGNED
                                - SIGNED
                              examples:
                                - NOT_SIGNED
                            start_date:
                              allOf:
                                - type:
                                    - string
                                    - 'null'
                                  pattern: >-
                                    ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                    ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                  examples:
                                    - '2021-07-21 18:38:00'
                                - description: The datetime when the Scheduled Work is/was planned to start
                            started_by_id:
                              description: The ID of the Operator that started the Scheduled Work.
                              type:
                                - integer
                                - 'null'
                              examples:
                                - 123
                            state:
                              description: The current state of the Scheduled Work.
                              type: string
                              enum:
                                - SCHEDULED
                                - RUNNING
                                - PAUSED
                                - COMPLETED
                                - CANCELED
                                - ARCHIVED
                                - COMPLETED_CANCELED
                              examples:
                                - COMPLETED
                            time_running:
                              description: The current running duration of the Scheduled work in ISO-8601 duration format.
                              type:
                                - string
                                - 'null'
                              examples:
                                - P0Y0M0DT0H1M19S
                            visit:
                              description: >-
                                Indicates the position/step of the Scheduled work in the parent Work / Planned Job that
                                is originates from (e.g. can be the first Scheduled Work of the Work / Planned Job, the
                                second, and so on)
                              type:
                                - integer
                                - 'null'
                              examples:
                                - 1
                            work_id:
                              description: The ID of the parent Work / Planned Job
                              type: integer
                              examples:
                                - 123
                            next_sla_date:
                              description: >
                                The datetime of the closest SLA that is still ongoing in the Scheduled Work

                                (This field includes only SLAs that have not finished yet and are still ongoing, and
                                will be null if there's none)
                              type:
                                - string
                                - 'null'
                              format: date-time
                              examples:
                                - '2014-09-01 02:22:00'
                            next_sla_percentage:
                              description: >
                                The percentage of the Scheduled Work tasks that are completed in the closest SLA that is
                                still ongoing

                                (This field includes only SLAs that have not finished yet and are still ongoing, and
                                will be null if there's none)
                              type:
                                - number
                                - 'null'
                              examples:
                                - 75.5
                            next_scheduled_work_sla_id:
                              description: >
                                The ID of the next SLA

                                (This field includes the next SLA, despite his current status being already finished or
                                paused)
                              type:
                                - integer
                                - 'null'
                              examples:
                                - 123
                            next_scheduled_work_sla_date:
                              description: >
                                The datetime of the next SLA

                                (This field includes the next SLA, despite his current status being already finished or
                                paused)
                              type:
                                - string
                                - 'null'
                              format: date-time
                              examples:
                                - '2014-09-01 02:22:00'
                            next_scheduled_work_sla_status_order:
                              description: >
                                The status order of the next SLA

                                (0 if status is 'RUNNING', 1 if status is 'PAUSED', 2 if status is 'FINISHED', otherwise
                                3)

                                (This field includes the next SLA, despite his current status being already finished or
                                paused)
                              type:
                                - integer
                                - 'null'
                              examples:
                                - 0
                            rescheduled_by_user:
                              description: Indicates if the Scheduled Work was manually rescheduled by an User
                              type: boolean
                              examples:
                                - false
                            network_id:
                              description: ID used to reference a shared Planned Job Order
                              type:
                                - integer
                                - 'null'
                              examples:
                                - 123
                            updated_at:
                              allOf:
                                - type:
                                    - string
                                    - 'null'
                                  pattern: >-
                                    ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                    ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                  examples:
                                    - '2021-07-21 18:38:00'
                                - description: The datetime of the last update in the Scheduled Work
                            display_start_date:
                              allOf:
                                - type:
                                    - string
                                    - 'null'
                                  pattern: >-
                                    ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                    ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                  examples:
                                    - '2021-07-21 18:38:00'
                                - description: The start datetime to display in the Scheduled Work
                                  type:
                                    - string
                                    - 'null'
                            display_complete_date:
                              allOf:
                                - type:
                                    - string
                                    - 'null'
                                  pattern: >-
                                    ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                    ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                  examples:
                                    - '2021-07-21 18:38:00'
                                - description: The complete datetime to display in the Scheduled Work
                                  type:
                                    - string
                                    - 'null'
                            estimated_duration_absolute_deviation:
                              description: >-
                                The absolute deviation between the actual manpower duration and the estimated task time
                                in the Scheduled Work, representing the total difference regardless of whether the
                                estimate was over or under
                              type:
                                - integer
                                - 'null'
                              examples:
                                - 150
                            estimated_duration_relative_deviation:
                              description: >-
                                The relative deviation between the actual manpower duration and the estimated task time
                                in the Scheduled Work. A negative value indicates the estimate was too low, while a
                                positive value indicates it was too high
                              type:
                                - integer
                                - 'null'
                              examples:
                                - -150
                            pause_reason_id:
                              description: The ID of the Pause Reason associated with the Scheduled Work
                              type:
                                - integer
                                - 'null'
                              examples:
                                - 123
                            last_status_description:
                              description: A description provided when the last status change occurred on the Scheduled Work
                              type:
                                - string
                                - 'null'
                              examples:
                                - Waiting for spare parts delivery
                        relationships:
                          description: The relationships of the Scheduled Work (Only present when expanded in the request)
                          type: object
                          properties:
                            auditStats:
                              type: object
                              properties:
                                data:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - audit_stats
                                        readOnly: true
                                      id:
                                        type: string
                                        readOnly: true
                            buyOrders:
                              type: object
                              properties:
                                data:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - buy_order
                                        readOnly: true
                                      id:
                                        type: string
                                        readOnly: true
                            client:
                              type: object
                              properties:
                                data:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - client
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                            completedBy:
                              type: object
                              properties:
                                data:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - operator
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                            elementRegistries:
                              type: object
                              properties:
                                data:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - element_registry
                                        readOnly: true
                                      id:
                                        type: string
                                        readOnly: true
                            entity:
                              type: object
                              properties:
                                data:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - entity
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                            events:
                              type: object
                              properties:
                                data:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - event
                                        readOnly: true
                                      id:
                                        type: string
                                        readOnly: true
                            eventsPlanned:
                              type: object
                              properties:
                                data:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - event
                                        readOnly: true
                                      id:
                                        type: string
                                        readOnly: true
                            files:
                              type: object
                              properties:
                                data:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - file
                                        readOnly: true
                                      id:
                                        type: string
                                        readOnly: true
                            gatekeeperAnswerRegistries:
                              type: object
                              properties:
                                data:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - gatekeeper_answer_registry
                                        readOnly: true
                                      id:
                                        type: string
                                        readOnly: true
                            networkStatus:
                              type: object
                              properties:
                                data:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      type:
                                        description: >-
                                          If RECEIVER the Scheduled Work was received on Network, if SENDER the
                                          Scheduled Work was sent to the Network.
                                        type: string
                                        enum:
                                          - SENDER
                                          - RECEIVER
                                        readOnly: true
                                      action:
                                        description: >-
                                          If UNSHARED, the Scheduled Work was unshared from Network, if null, no action
                                          was taken.
                                        type: string
                                        readOnly: true
                                      id:
                                        type: string
                                        readOnly: true
                                      in_sync:
                                        description: If the Scheduled Work is in sync of execution with the Network.
                                        type: boolean
                                        readOnly: true
                                      network_entity_uuid:
                                        description: The UUID of the Network Entity related to the Scheduled Work network status.
                                        type: string
                                        readOnly: true
                                      network_relation_id:
                                        description: >-
                                          The ID of the Network Relation related to the Scheduled Work network status.
                                          It can be from a Client or a Supplier.
                                        type: integer
                                        readOnly: true
                                      network_relation_type:
                                        description: >-
                                          The type of Network Relation related to the Scheduled Work network status. It
                                          can be from a Client or a Supplier, used to identify the relation ID and the
                                          relation the Network Entity has to the Scheduled Work.
                                        type: string
                                        enum:
                                          - CLIENT
                                          - SUPPLIER
                                        readOnly: true
                                      shared:
                                        description: If the Scheduled Work is actively shared on Network.
                                        type: boolean
                                        readOnly: true
                            otherCosts:
                              type: object
                              properties:
                                data:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - other-cost
                                        readOnly: true
                                      id:
                                        type: string
                                        readOnly: true
                            participants:
                              type: object
                              properties:
                                data:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - operator
                                        readOnly: true
                                      id:
                                        type: string
                                        readOnly: true
                            pausedBy:
                              type: object
                              properties:
                                data:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - operator
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                            reminderRules:
                              type: object
                              properties:
                                data:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - reminder_rules
                                        readOnly: true
                                      id:
                                        type: string
                                        readOnly: true
                            reminders:
                              type: object
                              properties:
                                data:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - reminder
                                        readOnly: true
                                      id:
                                        type: string
                                        readOnly: true
                            requests:
                              type: object
                              properties:
                                data:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - request
                                        readOnly: true
                                      id:
                                        type: string
                                        readOnly: true
                            scheduledWorkSlas:
                              type: object
                              properties:
                                data:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - schedule_work_sla
                                        readOnly: true
                                      id:
                                        type: string
                                        readOnly: true
                            startedBy:
                              type: object
                              properties:
                                data:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - operator
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                            stock:
                              type: object
                              properties:
                                data:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - stock
                                        readOnly: true
                                      id:
                                        type: string
                                        readOnly: true
                            stockTasks:
                              type: object
                              properties:
                                data:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - stock
                                        readOnly: true
                                      id:
                                        type: string
                                        readOnly: true
                            survey:
                              type: object
                              properties:
                                data:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - survey
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                            surveyFeedbacks:
                              type: object
                              properties:
                                data:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - survey_feedback
                                        readOnly: true
                                      id:
                                        type: string
                                        readOnly: true
                            work:
                              type: object
                              properties:
                                data:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - work
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                            realStartDateEditedBy:
                              type: object
                              properties:
                                data:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - operator
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                            completeDateEditedBy:
                              type: object
                              properties:
                                data:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - operator
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                            failureScheduleMapping:
                              type: object
                              properties:
                                data:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - failure_schedule_mapping
                                        readOnly: true
                                      id:
                                        type: string
                                        readOnly: true
                            pause_reason:
                              description: The Pause Reason associated with the Scheduled Work
                              type: object
                              properties:
                                data:
                                  type:
                                    - object
                                    - 'null'
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - pause_reason
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                            assignees:
                              description: The Operators and Teams assigned to the Scheduled Work
                              type: object
                              properties:
                                data:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      type:
                                        type: string
                                        enum:
                                          - scheduled_work_assignee
                                        readOnly: true
                                      id:
                                        type: string
                                        readOnly: true
                      required:
                        - id
                        - type
                        - attributes
                  included:
                    description: List of relationships to be included
                    type: array
                    items:
                      type: object
                    uniqueItems: true
                  meta:
                    title: Meta
                    description: Meta model structure details
                    type: object
                    properties:
                      pagination:
                        type: object
                        properties:
                          total:
                            description: Total items.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          count:
                            description: Total items returned for the current page.
                            type: integer
                            minimum: 0
                            examples:
                              - 1
                          per_page:
                            description: Maximum number of records per page.
                            type: integer
                            minimum: 1
                            default: 200
                            examples:
                              - 1
                          current_page:
                            description: Number of the current page.
                            type: integer
                            minimum: 1
                            default: 1
                          total_pages:
                            description: Number of the total pages.
                            type: integer
                            minimum: 1
                            default: 1
                        required:
                          - total
                          - count
                          - per_page
                          - current_page
                          - total_pages
                  links:
                    title: Response Links on listing operations
                    description: >-
                      Requests that return multiple items include a `links` attribute, with links related to request's
                      context.
                    type: object
                    properties:
                      self:
                        description: Current response link.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      first:
                        description: Link to the first page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      last:
                        description: Link to the previous page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                      next:
                        description: Link to the next page result.
                        type: string
                        examples:
                          - /path?page=1
                        readOnly: true
                    required:
                      - self
                      - first
                      - last
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
  /works/scheduled/{scheduledWorkId}:
    get:
      operationId: getScheduledWork
      tags:
        - Scheduled Works
      summary: Get a Scheduled Work
      description: |
        Planned Job Orders are referred in Infraspeak's API as Scheduled Works.

        This endpoint allows you to get information about a specific Scheduled Work (Planned Job Order).
      parameters:
        - name: scheduledWorkId
          in: path
          description: The Schedule Work ID
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: Scheduled Work
                    description: Scheduled Order model structure details
                    type: object
                    properties:
                      id:
                        description: ID of the Scheduled Order
                        type: string
                        readOnly: true
                        examples:
                          - '123'
                      type:
                        description: Model type
                        type: string
                        enum:
                          - scheduled_work
                        readOnly: true
                        examples:
                          - scheduled_work
                      attributes:
                        type: object
                        properties:
                          entity_id:
                            description: The ID of the Entity where the Scheduled Work belongs.
                            type: integer
                            examples:
                              - 123
                          complete_date:
                            description: The datetime when the Scheduled Work was completed
                            type:
                              - string
                              - 'null'
                            format: date-time
                            examples:
                              - '2014-09-01 02:22:00'
                          cost_center_name:
                            description: The name of the Cost Center associated with the Scheduled Work.
                            type:
                              - string
                              - 'null'
                            examples:
                              - abc
                          completed_by_id:
                            description: The ID of the Operator that completed the Scheduled Work.
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 123
                          completed_percentage:
                            description: The percentage of the Scheduled Work that is completed.
                            type: integer
                            examples:
                              - 45
                          completed_date:
                            description: The datetime when the Scheduled Work was completed
                            type:
                              - string
                              - 'null'
                            format: date-time
                            examples:
                              - '2014-09-01 02:22:00'
                          confirmed:
                            description: Indicates if the Scheduled Work is confirmed.
                            type: boolean
                            examples:
                              - true
                          failure_id:
                            description: >-
                              The ID of the Failure / Work Order associated with the Scheduled Work (Only if the
                              Scheduled work originated from a Failure / Work Order)
                            type:
                              - integer
                              - 'null'
                          last_status_change_date:
                            description: The datetime when the Scheduled Work status changed for the last time
                            type:
                              - string
                              - 'null'
                            format: date-time
                            examples:
                              - '2014-09-01 02:22:00'
                          last_status_change_operator:
                            description: The name of the Operator that changed the Scheduled Work status for the last time
                            type:
                              - string
                              - 'null'
                            examples:
                              - John
                          manpower_duration:
                            description: The total manpower duration of the Scheduled work in ISO-8601 duration format.
                            type:
                              - string
                              - 'null'
                            examples:
                              - P0Y0M0DT0H1M19S
                          manpower_cost:
                            description: The total manpower cost of the Scheduled work in the currency of the logged in user.
                            type:
                              - number
                              - 'null'
                            examples:
                              - 12.5
                          observation:
                            description: Observations added to the Scheduled Work.
                            type:
                              - string
                              - 'null'
                            examples:
                              - abc
                          real_start_date:
                            description: >-
                              The datetime when the Scheduled Work was actually started (not to confuse with the
                              datetime when the Scheduled work planned to start)
                            type:
                              - string
                              - 'null'
                            format: date-time
                            examples:
                              - '2014-09-01 02:22:00'
                          running:
                            description: Indicates if the Scheduled Work is currently in a running status
                            type: boolean
                            examples:
                              - true
                          schedule_work_id:
                            description: The ID of the Scheduled Work
                            type: integer
                            examples:
                              - 123
                          signature_status:
                            description: Indicates if the Scheduled Work is signed by a responsible.
                            type: string
                            enum:
                              - NOT_SIGNED
                              - SIGNED
                            examples:
                              - NOT_SIGNED
                          start_date:
                            allOf:
                              - type:
                                  - string
                                  - 'null'
                                pattern: >-
                                  ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                  ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                examples:
                                  - '2021-07-21 18:38:00'
                              - description: The datetime when the Scheduled Work is/was planned to start
                          started_by_id:
                            description: The ID of the Operator that started the Scheduled Work.
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 123
                          state:
                            description: The current state of the Scheduled Work.
                            type: string
                            enum:
                              - SCHEDULED
                              - RUNNING
                              - PAUSED
                              - COMPLETED
                              - CANCELED
                              - ARCHIVED
                              - COMPLETED_CANCELED
                            examples:
                              - COMPLETED
                          time_running:
                            description: The current running duration of the Scheduled work in ISO-8601 duration format.
                            type:
                              - string
                              - 'null'
                            examples:
                              - P0Y0M0DT0H1M19S
                          visit:
                            description: >-
                              Indicates the position/step of the Scheduled work in the parent Work / Planned Job that is
                              originates from (e.g. can be the first Scheduled Work of the Work / Planned Job, the
                              second, and so on)
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 1
                          work_id:
                            description: The ID of the parent Work / Planned Job
                            type: integer
                            examples:
                              - 123
                          next_sla_date:
                            description: >
                              The datetime of the closest SLA that is still ongoing in the Scheduled Work

                              (This field includes only SLAs that have not finished yet and are still ongoing, and will
                              be null if there's none)
                            type:
                              - string
                              - 'null'
                            format: date-time
                            examples:
                              - '2014-09-01 02:22:00'
                          next_sla_percentage:
                            description: >
                              The percentage of the Scheduled Work tasks that are completed in the closest SLA that is
                              still ongoing

                              (This field includes only SLAs that have not finished yet and are still ongoing, and will
                              be null if there's none)
                            type:
                              - number
                              - 'null'
                            examples:
                              - 75.5
                          next_scheduled_work_sla_id:
                            description: >
                              The ID of the next SLA

                              (This field includes the next SLA, despite his current status being already finished or
                              paused)
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 123
                          next_scheduled_work_sla_date:
                            description: >
                              The datetime of the next SLA

                              (This field includes the next SLA, despite his current status being already finished or
                              paused)
                            type:
                              - string
                              - 'null'
                            format: date-time
                            examples:
                              - '2014-09-01 02:22:00'
                          next_scheduled_work_sla_status_order:
                            description: >
                              The status order of the next SLA

                              (0 if status is 'RUNNING', 1 if status is 'PAUSED', 2 if status is 'FINISHED', otherwise
                              3)

                              (This field includes the next SLA, despite his current status being already finished or
                              paused)
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 0
                          rescheduled_by_user:
                            description: Indicates if the Scheduled Work was manually rescheduled by an User
                            type: boolean
                            examples:
                              - false
                          network_id:
                            description: ID used to reference a shared Planned Job Order
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 123
                          updated_at:
                            allOf:
                              - type:
                                  - string
                                  - 'null'
                                pattern: >-
                                  ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                  ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                examples:
                                  - '2021-07-21 18:38:00'
                              - description: The datetime of the last update in the Scheduled Work
                          display_start_date:
                            allOf:
                              - type:
                                  - string
                                  - 'null'
                                pattern: >-
                                  ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                  ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                examples:
                                  - '2021-07-21 18:38:00'
                              - description: The start datetime to display in the Scheduled Work
                                type:
                                  - string
                                  - 'null'
                          display_complete_date:
                            allOf:
                              - type:
                                  - string
                                  - 'null'
                                pattern: >-
                                  ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                  ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                examples:
                                  - '2021-07-21 18:38:00'
                              - description: The complete datetime to display in the Scheduled Work
                                type:
                                  - string
                                  - 'null'
                          estimated_duration_absolute_deviation:
                            description: >-
                              The absolute deviation between the actual manpower duration and the estimated task time in
                              the Scheduled Work, representing the total difference regardless of whether the estimate
                              was over or under
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 150
                          estimated_duration_relative_deviation:
                            description: >-
                              The relative deviation between the actual manpower duration and the estimated task time in
                              the Scheduled Work. A negative value indicates the estimate was too low, while a positive
                              value indicates it was too high
                            type:
                              - integer
                              - 'null'
                            examples:
                              - -150
                          pause_reason_id:
                            description: The ID of the Pause Reason associated with the Scheduled Work
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 123
                          last_status_description:
                            description: A description provided when the last status change occurred on the Scheduled Work
                            type:
                              - string
                              - 'null'
                            examples:
                              - Waiting for spare parts delivery
                      relationships:
                        description: The relationships of the Scheduled Work (Only present when expanded in the request)
                        type: object
                        properties:
                          auditStats:
                            type: object
                            properties:
                              data:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - audit_stats
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                          buyOrders:
                            type: object
                            properties:
                              data:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - buy_order
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                          client:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - client
                                    readOnly: true
                                  id:
                                    type: string
                                    readOnly: true
                          completedBy:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - operator
                                    readOnly: true
                                  id:
                                    type: string
                                    readOnly: true
                          elementRegistries:
                            type: object
                            properties:
                              data:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - element_registry
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                          entity:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - entity
                                    readOnly: true
                                  id:
                                    type: string
                                    readOnly: true
                          events:
                            type: object
                            properties:
                              data:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - event
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                          eventsPlanned:
                            type: object
                            properties:
                              data:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - event
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                          files:
                            type: object
                            properties:
                              data:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - file
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                          gatekeeperAnswerRegistries:
                            type: object
                            properties:
                              data:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - gatekeeper_answer_registry
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                          networkStatus:
                            type: object
                            properties:
                              data:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    type:
                                      description: >-
                                        If RECEIVER the Scheduled Work was received on Network, if SENDER the Scheduled
                                        Work was sent to the Network.
                                      type: string
                                      enum:
                                        - SENDER
                                        - RECEIVER
                                      readOnly: true
                                    action:
                                      description: >-
                                        If UNSHARED, the Scheduled Work was unshared from Network, if null, no action
                                        was taken.
                                      type: string
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                                    in_sync:
                                      description: If the Scheduled Work is in sync of execution with the Network.
                                      type: boolean
                                      readOnly: true
                                    network_entity_uuid:
                                      description: The UUID of the Network Entity related to the Scheduled Work network status.
                                      type: string
                                      readOnly: true
                                    network_relation_id:
                                      description: >-
                                        The ID of the Network Relation related to the Scheduled Work network status. It
                                        can be from a Client or a Supplier.
                                      type: integer
                                      readOnly: true
                                    network_relation_type:
                                      description: >-
                                        The type of Network Relation related to the Scheduled Work network status. It
                                        can be from a Client or a Supplier, used to identify the relation ID and the
                                        relation the Network Entity has to the Scheduled Work.
                                      type: string
                                      enum:
                                        - CLIENT
                                        - SUPPLIER
                                      readOnly: true
                                    shared:
                                      description: If the Scheduled Work is actively shared on Network.
                                      type: boolean
                                      readOnly: true
                          otherCosts:
                            type: object
                            properties:
                              data:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - other-cost
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                          participants:
                            type: object
                            properties:
                              data:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - operator
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                          pausedBy:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - operator
                                    readOnly: true
                                  id:
                                    type: string
                                    readOnly: true
                          reminderRules:
                            type: object
                            properties:
                              data:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - reminder_rules
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                          reminders:
                            type: object
                            properties:
                              data:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - reminder
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                          requests:
                            type: object
                            properties:
                              data:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - request
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                          scheduledWorkSlas:
                            type: object
                            properties:
                              data:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - schedule_work_sla
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                          startedBy:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - operator
                                    readOnly: true
                                  id:
                                    type: string
                                    readOnly: true
                          stock:
                            type: object
                            properties:
                              data:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - stock
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                          stockTasks:
                            type: object
                            properties:
                              data:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - stock
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                          survey:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - survey
                                    readOnly: true
                                  id:
                                    type: string
                                    readOnly: true
                          surveyFeedbacks:
                            type: object
                            properties:
                              data:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - survey_feedback
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                          work:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - work
                                    readOnly: true
                                  id:
                                    type: string
                                    readOnly: true
                          realStartDateEditedBy:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - operator
                                    readOnly: true
                                  id:
                                    type: string
                                    readOnly: true
                          completeDateEditedBy:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - operator
                                    readOnly: true
                                  id:
                                    type: string
                                    readOnly: true
                          failureScheduleMapping:
                            type: object
                            properties:
                              data:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - failure_schedule_mapping
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                          pause_reason:
                            description: The Pause Reason associated with the Scheduled Work
                            type: object
                            properties:
                              data:
                                type:
                                  - object
                                  - 'null'
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - pause_reason
                                    readOnly: true
                                  id:
                                    type: string
                                    readOnly: true
                          assignees:
                            description: The Operators and Teams assigned to the Scheduled Work
                            type: object
                            properties:
                              data:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - scheduled_work_assignee
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                    required:
                      - id
                      - type
                      - attributes
                  included:
                    description: List of relationships to be included
                    type: array
                    items:
                      type: object
                    uniqueItems: true
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
    patch:
      operationId: updateScheduledWork
      tags:
        - Scheduled Works
      summary: Update a Scheduled Work
      description: |
        Planned Job Orders are referred in Infraspeak's API as Scheduled Works.

        This endpoint allows you to update a Scheduled Work (Planned Job Order).
      parameters:
        - name: scheduledWorkId
          in: path
          description: The Schedule Work ID
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              description: ScheduleWork PATCH payload
              type: object
              properties:
                date:
                  description: Date planned for the Scheduled Work / Planned Job Order to start (in Y-m-d\TH:i:s format)
                  type: string
                  format: date-time
                  examples:
                    - '2022-12-12T12:12:12'
                description:
                  description: Brief description of the Scheduled Work / Planned Job Order
                  type:
                    - string
                    - 'null'
                  examples:
                    - abc
                assignees:
                  description: Operators to assign to the Scheduled Work / Planned Job Order
                  type: object
                  properties:
                    force_replace:
                      description: When true, replaces the current assignees with the provided ones instead of merging
                      type: boolean
                      examples:
                        - false
                    operators:
                      description: Operator assignees to attach and/or detach
                      type: object
                      properties:
                        attach_ids:
                          description: IDs of the operators to assign to the Scheduled Work
                          type: array
                          items:
                            type: integer
                          examples:
                            - - 1
                              - 2
                        detach_ids:
                          description: IDs of the operators to unassign from the Scheduled Work
                          type: array
                          items:
                            type: integer
                          examples:
                            - - 3
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    title: Scheduled Work
                    description: Scheduled Order model structure details
                    type: object
                    properties:
                      id:
                        description: ID of the Scheduled Order
                        type: string
                        readOnly: true
                        examples:
                          - '123'
                      type:
                        description: Model type
                        type: string
                        enum:
                          - scheduled_work
                        readOnly: true
                        examples:
                          - scheduled_work
                      attributes:
                        type: object
                        properties:
                          entity_id:
                            description: The ID of the Entity where the Scheduled Work belongs.
                            type: integer
                            examples:
                              - 123
                          complete_date:
                            description: The datetime when the Scheduled Work was completed
                            type:
                              - string
                              - 'null'
                            format: date-time
                            examples:
                              - '2014-09-01 02:22:00'
                          cost_center_name:
                            description: The name of the Cost Center associated with the Scheduled Work.
                            type:
                              - string
                              - 'null'
                            examples:
                              - abc
                          completed_by_id:
                            description: The ID of the Operator that completed the Scheduled Work.
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 123
                          completed_percentage:
                            description: The percentage of the Scheduled Work that is completed.
                            type: integer
                            examples:
                              - 45
                          completed_date:
                            description: The datetime when the Scheduled Work was completed
                            type:
                              - string
                              - 'null'
                            format: date-time
                            examples:
                              - '2014-09-01 02:22:00'
                          confirmed:
                            description: Indicates if the Scheduled Work is confirmed.
                            type: boolean
                            examples:
                              - true
                          failure_id:
                            description: >-
                              The ID of the Failure / Work Order associated with the Scheduled Work (Only if the
                              Scheduled work originated from a Failure / Work Order)
                            type:
                              - integer
                              - 'null'
                          last_status_change_date:
                            description: The datetime when the Scheduled Work status changed for the last time
                            type:
                              - string
                              - 'null'
                            format: date-time
                            examples:
                              - '2014-09-01 02:22:00'
                          last_status_change_operator:
                            description: The name of the Operator that changed the Scheduled Work status for the last time
                            type:
                              - string
                              - 'null'
                            examples:
                              - John
                          manpower_duration:
                            description: The total manpower duration of the Scheduled work in ISO-8601 duration format.
                            type:
                              - string
                              - 'null'
                            examples:
                              - P0Y0M0DT0H1M19S
                          manpower_cost:
                            description: The total manpower cost of the Scheduled work in the currency of the logged in user.
                            type:
                              - number
                              - 'null'
                            examples:
                              - 12.5
                          observation:
                            description: Observations added to the Scheduled Work.
                            type:
                              - string
                              - 'null'
                            examples:
                              - abc
                          real_start_date:
                            description: >-
                              The datetime when the Scheduled Work was actually started (not to confuse with the
                              datetime when the Scheduled work planned to start)
                            type:
                              - string
                              - 'null'
                            format: date-time
                            examples:
                              - '2014-09-01 02:22:00'
                          running:
                            description: Indicates if the Scheduled Work is currently in a running status
                            type: boolean
                            examples:
                              - true
                          schedule_work_id:
                            description: The ID of the Scheduled Work
                            type: integer
                            examples:
                              - 123
                          signature_status:
                            description: Indicates if the Scheduled Work is signed by a responsible.
                            type: string
                            enum:
                              - NOT_SIGNED
                              - SIGNED
                            examples:
                              - NOT_SIGNED
                          start_date:
                            allOf:
                              - type:
                                  - string
                                  - 'null'
                                pattern: >-
                                  ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                  ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                examples:
                                  - '2021-07-21 18:38:00'
                              - description: The datetime when the Scheduled Work is/was planned to start
                          started_by_id:
                            description: The ID of the Operator that started the Scheduled Work.
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 123
                          state:
                            description: The current state of the Scheduled Work.
                            type: string
                            enum:
                              - SCHEDULED
                              - RUNNING
                              - PAUSED
                              - COMPLETED
                              - CANCELED
                              - ARCHIVED
                              - COMPLETED_CANCELED
                            examples:
                              - COMPLETED
                          time_running:
                            description: The current running duration of the Scheduled work in ISO-8601 duration format.
                            type:
                              - string
                              - 'null'
                            examples:
                              - P0Y0M0DT0H1M19S
                          visit:
                            description: >-
                              Indicates the position/step of the Scheduled work in the parent Work / Planned Job that is
                              originates from (e.g. can be the first Scheduled Work of the Work / Planned Job, the
                              second, and so on)
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 1
                          work_id:
                            description: The ID of the parent Work / Planned Job
                            type: integer
                            examples:
                              - 123
                          next_sla_date:
                            description: >
                              The datetime of the closest SLA that is still ongoing in the Scheduled Work

                              (This field includes only SLAs that have not finished yet and are still ongoing, and will
                              be null if there's none)
                            type:
                              - string
                              - 'null'
                            format: date-time
                            examples:
                              - '2014-09-01 02:22:00'
                          next_sla_percentage:
                            description: >
                              The percentage of the Scheduled Work tasks that are completed in the closest SLA that is
                              still ongoing

                              (This field includes only SLAs that have not finished yet and are still ongoing, and will
                              be null if there's none)
                            type:
                              - number
                              - 'null'
                            examples:
                              - 75.5
                          next_scheduled_work_sla_id:
                            description: >
                              The ID of the next SLA

                              (This field includes the next SLA, despite his current status being already finished or
                              paused)
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 123
                          next_scheduled_work_sla_date:
                            description: >
                              The datetime of the next SLA

                              (This field includes the next SLA, despite his current status being already finished or
                              paused)
                            type:
                              - string
                              - 'null'
                            format: date-time
                            examples:
                              - '2014-09-01 02:22:00'
                          next_scheduled_work_sla_status_order:
                            description: >
                              The status order of the next SLA

                              (0 if status is 'RUNNING', 1 if status is 'PAUSED', 2 if status is 'FINISHED', otherwise
                              3)

                              (This field includes the next SLA, despite his current status being already finished or
                              paused)
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 0
                          rescheduled_by_user:
                            description: Indicates if the Scheduled Work was manually rescheduled by an User
                            type: boolean
                            examples:
                              - false
                          network_id:
                            description: ID used to reference a shared Planned Job Order
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 123
                          updated_at:
                            allOf:
                              - type:
                                  - string
                                  - 'null'
                                pattern: >-
                                  ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                  ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                examples:
                                  - '2021-07-21 18:38:00'
                              - description: The datetime of the last update in the Scheduled Work
                          display_start_date:
                            allOf:
                              - type:
                                  - string
                                  - 'null'
                                pattern: >-
                                  ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                  ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                examples:
                                  - '2021-07-21 18:38:00'
                              - description: The start datetime to display in the Scheduled Work
                                type:
                                  - string
                                  - 'null'
                          display_complete_date:
                            allOf:
                              - type:
                                  - string
                                  - 'null'
                                pattern: >-
                                  ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])
                                  ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
                                examples:
                                  - '2021-07-21 18:38:00'
                              - description: The complete datetime to display in the Scheduled Work
                                type:
                                  - string
                                  - 'null'
                          estimated_duration_absolute_deviation:
                            description: >-
                              The absolute deviation between the actual manpower duration and the estimated task time in
                              the Scheduled Work, representing the total difference regardless of whether the estimate
                              was over or under
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 150
                          estimated_duration_relative_deviation:
                            description: >-
                              The relative deviation between the actual manpower duration and the estimated task time in
                              the Scheduled Work. A negative value indicates the estimate was too low, while a positive
                              value indicates it was too high
                            type:
                              - integer
                              - 'null'
                            examples:
                              - -150
                          pause_reason_id:
                            description: The ID of the Pause Reason associated with the Scheduled Work
                            type:
                              - integer
                              - 'null'
                            examples:
                              - 123
                          last_status_description:
                            description: A description provided when the last status change occurred on the Scheduled Work
                            type:
                              - string
                              - 'null'
                            examples:
                              - Waiting for spare parts delivery
                      relationships:
                        description: The relationships of the Scheduled Work (Only present when expanded in the request)
                        type: object
                        properties:
                          auditStats:
                            type: object
                            properties:
                              data:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - audit_stats
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                          buyOrders:
                            type: object
                            properties:
                              data:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - buy_order
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                          client:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - client
                                    readOnly: true
                                  id:
                                    type: string
                                    readOnly: true
                          completedBy:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - operator
                                    readOnly: true
                                  id:
                                    type: string
                                    readOnly: true
                          elementRegistries:
                            type: object
                            properties:
                              data:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - element_registry
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                          entity:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - entity
                                    readOnly: true
                                  id:
                                    type: string
                                    readOnly: true
                          events:
                            type: object
                            properties:
                              data:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - event
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                          eventsPlanned:
                            type: object
                            properties:
                              data:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - event
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                          files:
                            type: object
                            properties:
                              data:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - file
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                          gatekeeperAnswerRegistries:
                            type: object
                            properties:
                              data:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - gatekeeper_answer_registry
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                          networkStatus:
                            type: object
                            properties:
                              data:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    type:
                                      description: >-
                                        If RECEIVER the Scheduled Work was received on Network, if SENDER the Scheduled
                                        Work was sent to the Network.
                                      type: string
                                      enum:
                                        - SENDER
                                        - RECEIVER
                                      readOnly: true
                                    action:
                                      description: >-
                                        If UNSHARED, the Scheduled Work was unshared from Network, if null, no action
                                        was taken.
                                      type: string
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                                    in_sync:
                                      description: If the Scheduled Work is in sync of execution with the Network.
                                      type: boolean
                                      readOnly: true
                                    network_entity_uuid:
                                      description: The UUID of the Network Entity related to the Scheduled Work network status.
                                      type: string
                                      readOnly: true
                                    network_relation_id:
                                      description: >-
                                        The ID of the Network Relation related to the Scheduled Work network status. It
                                        can be from a Client or a Supplier.
                                      type: integer
                                      readOnly: true
                                    network_relation_type:
                                      description: >-
                                        The type of Network Relation related to the Scheduled Work network status. It
                                        can be from a Client or a Supplier, used to identify the relation ID and the
                                        relation the Network Entity has to the Scheduled Work.
                                      type: string
                                      enum:
                                        - CLIENT
                                        - SUPPLIER
                                      readOnly: true
                                    shared:
                                      description: If the Scheduled Work is actively shared on Network.
                                      type: boolean
                                      readOnly: true
                          otherCosts:
                            type: object
                            properties:
                              data:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - other-cost
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                          participants:
                            type: object
                            properties:
                              data:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - operator
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                          pausedBy:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - operator
                                    readOnly: true
                                  id:
                                    type: string
                                    readOnly: true
                          reminderRules:
                            type: object
                            properties:
                              data:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - reminder_rules
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                          reminders:
                            type: object
                            properties:
                              data:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - reminder
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                          requests:
                            type: object
                            properties:
                              data:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - request
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                          scheduledWorkSlas:
                            type: object
                            properties:
                              data:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - schedule_work_sla
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                          startedBy:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - operator
                                    readOnly: true
                                  id:
                                    type: string
                                    readOnly: true
                          stock:
                            type: object
                            properties:
                              data:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - stock
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                          stockTasks:
                            type: object
                            properties:
                              data:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - stock
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                          survey:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - survey
                                    readOnly: true
                                  id:
                                    type: string
                                    readOnly: true
                          surveyFeedbacks:
                            type: object
                            properties:
                              data:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - survey_feedback
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                          work:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - work
                                    readOnly: true
                                  id:
                                    type: string
                                    readOnly: true
                          realStartDateEditedBy:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - operator
                                    readOnly: true
                                  id:
                                    type: string
                                    readOnly: true
                          completeDateEditedBy:
                            type: object
                            properties:
                              data:
                                type: object
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - operator
                                    readOnly: true
                                  id:
                                    type: string
                                    readOnly: true
                          failureScheduleMapping:
                            type: object
                            properties:
                              data:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - failure_schedule_mapping
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                          pause_reason:
                            description: The Pause Reason associated with the Scheduled Work
                            type: object
                            properties:
                              data:
                                type:
                                  - object
                                  - 'null'
                                properties:
                                  type:
                                    type: string
                                    enum:
                                      - pause_reason
                                    readOnly: true
                                  id:
                                    type: string
                                    readOnly: true
                          assignees:
                            description: The Operators and Teams assigned to the Scheduled Work
                            type: object
                            properties:
                              data:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - scheduled_work_assignee
                                      readOnly: true
                                    id:
                                      type: string
                                      readOnly: true
                    required:
                      - id
                      - type
                      - attributes
                  included:
                    description: List of relationships to be included
                    type: array
                    items:
                      type: object
                    uniqueItems: true
        '400':
          description: >-
            Bad Request. Occurs when invalid parameters are provided or on data validation errors. For example, trying
            to create a resource without providing required fields. In this case, you can check the `properties`
            attribute on the response for more details.
          content:
            application/json:
              schema:
                title: 400 Bad Request
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      properties:
                        description: Only present when related to property validation error
                        type: object
                      dev_message:
                        type: string
                        examples:
                          - Property validation error. Check the "properties" section in the response.
                      http_code:
                        type: integer
                        enum:
                          - 400
                      message:
                        type: string
                        examples:
                          - Property validation error.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 400
                      message: >-
                        Bad request error. This error can happen if a wrong id or parameter is supplied in the request,
                        resulting in an error or an empty result.
                Example with properties:
                  value:
                    status: error
                    error:
                      properties:
                        full_name:
                          - The full_name field is required.
                        email:
                          - The email field is required.
                      dev_message: Property validation error. Check the "properties" section in the response.
                      http_code: 400
                      message: Property validation error.
        '401':
          description: 'Unauthorized. Authentication or permission error. E.g.: missing, incorrect or invalid Access Token.'
          content:
            application/json:
              schema:
                title: 401 Unauthorized
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 401
                      message:
                        type: string
                        examples:
                          - Authentication token invalid.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 401
                      message: Authentication token invalid.
        '404':
          description: Resource Not Found. Requests to resources that don't exist or are malformed.
          content:
            application/json:
              schema:
                title: 404 Not Found
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 404
                      message:
                        type: string
                        examples:
                          - Resource not found
                      more_info:
                        type:
                          - string
                          - 'null'
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 404
                      message: Resource not found
        '429':
          description: >-
            Too Many Requests. The client has sent too many requests in a given amount of time (check Throttling
            section).
          headers:
            Retry-After:
              schema:
                type: integer
              description: Indicates how long the user agent should wait (in seconds) before making further requests.
              required: true
            X-RateLimit-Reset:
              schema:
                type: integer
              description: Indicates when the rate limit will be reset, in UNIX timestamp format.
              required: true
          content:
            application/json:
              schema:
                title: 429 Too Many Requests
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 429
                      message:
                        type: string
                        examples:
                          - Too Many Requests.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 429
                      message: Too Many Requests.
        '500':
          description: >-
            Internal Server Error. Please, report us and try to provide as much information as possible, such as the
            endpoint, HTTP request headers and request body if applicable.
          content:
            application/json:
              schema:
                title: 500 Internal Server Error
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  error:
                    type: object
                    properties:
                      http_code:
                        type: integer
                        enum:
                          - 500
                      message:
                        type: string
                        examples:
                          - An error has occurred during the request.
                      more_info:
                        type: string
              examples:
                Example:
                  value:
                    status: error
                    error:
                      http_code: 500
                      message: An error has occurred during the request.
components:
  securitySchemes:
    BearerAuth:
      description: Bearer token to be sent in "Authorization" request header.
      type: http
      bearerFormat: JWT
      scheme: bearer
  schemas:
    BaseDateTime:
      type:
        - string
        - 'null'
      pattern: ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01]) ([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9])$
      examples:
        - '2021-07-21 18:38:00'
security:
  - BearerAuth:
      - ''
