openapi: 3.0.1
info:
  title: MasInstallations API
  description: The REST API for Service Order Management provides a standardized mechanism
    for placing a service order with all of the necessary order parameters. It allows
    users to create, update & retrieve Service Orders and manages related notifications.
    A service order will describe a list of service order items. A service order item
    references an action on an existing or future service. By service we designed
    Customer-Facing Service (CFS) as well as Resource Facing Service (RFS). A service
    order is created based on service(s) that is(are) defined in a catalog.
  version: 1.7.24
servers:
- url: https://installations.sta.masstack.com/v1
  description: Staging server
- url: https://installations.masstack.com/v1
  description: Production server
security:
- Bearer: []
tags:
- name: ResourceOrder
  description: API for managing installation resource orders
- name: CalculateInstallation
  description: API for calculating the contract, delay and duration of an installation
- name: WorkorderInfo
  description: Work order information operations (history, installation part, etc.)
paths:
  /orgs/{org}/calculate:
    post:
      tags:
      - CalculateInstallation
      summary: Calculations of the contract, delay and duration of an installation
      description: This operation calculate a CalculateInstallation entity.
      operationId: calculateInstallation
      parameters:
        - $ref: "#/components/parameters/orgParam"
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CalculateInstallation'
        required: true
      responses:
        '200':
          description: CalculateInstallation response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CalculateInstallationResponse'
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
  /orgs/{org}/resourceOrder:
    post:
      tags:
      - ResourceOrder
      summary: Creates a ResourceOrder
      description: This operation creates a ResourceOrder entity.
      operationId: createResourceOrder
      parameters:
        - $ref: "#/components/parameters/orgParam"
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResourceOrder'
        required: true
      responses:
        '201':
          description: ResourceOrder response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceOrder'
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
  /orgs/{org}/resourceOrder/callbackPicking:
    post:
      tags:
      - ResourceOrder
      summary: Callback of Picking, UnPicking and Swap a ResourceOrder
      description: This operation picking, unpicking and swap a ResourceOrder entity.
      operationId: pickingResourceOrder
      parameters:
        - $ref: "#/components/parameters/orgParam"
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResourceOrder'
        required: true
      responses:
        '201':
          description: ResourceOrder response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceOrder'
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
  /orgs/{org}/resourceOrder/{id}:
    parameters:
      - $ref: "#/components/parameters/orgParam"
      - $ref: "#/components/parameters/idParam"
    get:
      tags:
      - ResourceOrder
      summary: Retrieves a ResourceOrder by ID
      description: This operation retrieves a ResourceOrder entity. Attribute selection
        is enabled for all first level attributes.
      operationId: retrieveResourceOrder
      responses:
        '200':
          description: ResourceOrder response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceOrder'
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
    put:
      tags:
      - ResourceOrder
      summary: Updates totally a ResourceOrder
      description: This operation updates totally a ResourceOrder entity.
      operationId: putResourceOrder
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResourceOrder'
        required: true
      responses:
        '200':
          description: ResourceOrder response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceOrder'
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
    delete:
      tags:
      - ResourceOrder
      summary: Remove work order by ID in external systems
      description: This operation to delete fake work orders due to fraud and other
        issues.
      operationId: deleteResourceOrder
      responses:
        '204':
          description: No Content
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
    patch:
      tags:
      - ResourceOrder
      summary: Updates partially a ResourceOrder
      description: This operation updates partially a ResourceOrder entity.
      operationId: patchResourceOrder
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResourceOrder'
        required: true
      responses:
        '200':
          description: ResourceOrder response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceOrder'
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
  /orgs/{org}/resourceOrder/{id}/endInstallation:
    patch:
      tags:
      - ResourceOrder
      summary: Partially updates a endInstallation
      description: This operation allows you to partially update an installation completion
        for a work order.
      operationId: eiResourceOrder
      parameters:
        - $ref: "#/components/parameters/orgParam"
        - $ref: "#/components/parameters/idParam"
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResourceOrder'
        required: true
      responses:
        '204':
          description: No Content
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
  /orgs/{org}/resourceOrder/{id}/notes:
    post:
      tags:
      - ResourceOrder
      summary: Sending notes to the technician
      description: This operation adds notes using the Note entity.
      operationId: note
      parameters:
        - $ref: "#/components/parameters/orgParam"
        - $ref: "#/components/parameters/idParam"
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Note'
        required: true
      responses:
        '204':
          description: No Content
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
  /orgs/{org}/resourceOrder/{id}/relatedParty:
    patch:
      tags:
      - ResourceOrder
      summary: Partially updates a RelatedParty
      description: Update customer-related information.
      operationId: relatedParty
      parameters:
        - $ref: "#/components/parameters/orgParam"
        - $ref: "#/components/parameters/idParam"
      requestBody:
        content:
          application/json:
            schema:
              items:
                $ref: '#/components/schemas/RelatedParty'
              type: array
        required: true
      responses:
        '200':
          description: ResourceOrder response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceOrder'
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
  /orgs/{org}/resourceOrder/{id}/resources:
    post:
      tags:
      - ResourceOrder
      summary: Add resource to order
      description: This operation allows you to add a resource to the work order.
      operationId: addResource
      parameters:
        - $ref: "#/components/parameters/orgParam"
        - $ref: "#/components/parameters/idParam"
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Resource'
        required: true
      responses:
        '200':
          description: ResourceOrder response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceOrder'
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
  /orgs/{org}/resourceOrder/{id}/resources/{itemId}:
    delete:
      tags:
      - ResourceOrder
      summary: Remove resource to order
      description: This operation allows you to remove a resource from the work order.
      operationId: deleteResource
      parameters:
        - $ref: "#/components/parameters/orgParam"
        - $ref: "#/components/parameters/idParam"
        - $ref: "#/components/parameters/itemIdParam"
      responses:
        '200':
          description: ResourceOrder response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceOrder'
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
    patch:
      tags:
      - ResourceOrder
      summary: Modify resource to order
      description: This operation allows you to modify a resource from the work order.
      operationId: patchResource
      parameters:
        - $ref: "#/components/parameters/orgParam"
        - $ref: "#/components/parameters/idParam"
        - $ref: "#/components/parameters/itemIdParam"
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Resource'
        required: true
      responses:
        '200':
          description: ResourceOrder response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceOrder'
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
  /orgs/{org}/workOrderInfo/{id}/history:
    get:
      tags:
        - WorkorderInfo
      operationId: getHistory
      summary: Get work order history
      description: Returns the complete history of a work order combining installation and appointment events, sorted chronologically.
      parameters:
        - $ref: "#/components/parameters/orgParam"
        - $ref: "#/components/parameters/idParam"
      responses:
        '200':
          description: History successfully retrieved
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/HistoryEntry'
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BackendException'
  /orgs/{org}/workOrderInfo/{id}/installationPart:
    get:
      tags:
        - WorkorderInfo
      operationId: getInstallationPart
      summary: Get installation part URL
      description: Returns the installation part URL for a completed work order
      parameters:
        - $ref: "#/components/parameters/orgParam"
        - $ref: "#/components/parameters/idParam"
      responses:
        '200':
          description: Installation part successfully retrieved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InstallationPartResponse'
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BackendException'
  /orgs/{org}/workOrderInfo/{id}/notes:
    get:
      tags:
        - WorkorderInfo
      operationId: getNotes
      summary: Get work order notes
      description: Returns the notes extracted from the work order, including technician comments, system notes, and installation closure information. Notes are sorted chronologically.
      parameters:
        - $ref: "#/components/parameters/orgParam"
        - $ref: "#/components/parameters/idParam"
      responses:
        '200':
          description: Notes successfully retrieved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotesResult'
        '404':
          description: Work order not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BackendException'
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BackendException'
components:
  parameters:
    orgParam:
      name: org
      in: path
      description: tenant name
      required: true
      schema:
        type: string
      example: masmovil
    idParam:
      name: id
      in: path
      description: a id of Resource Order
      required: true
      schema:
        type: string
      example: MYSIM_XXXX
    itemIdParam:
      name: itemId
      in: path
      description: a id of Resource Order Item
      required: true
      schema:
        type: string
      example: 5ff3dea6-4116-4526-8eb4-dcb94724963b
  schemas:
    AppointmentRef:
      required:
      - id
      type: object
      properties:
        description:
          type: string
          description: An explanatory text regarding the appointment made with a party
        href:
          type: string
          description: The reference of the appointment
        id:
          type: string
          description: The identifier of the referred appointment
      description: AppointmentRef Refers an appointment, such as a Customer presentation
        or internal meeting or site visit
    AttachmentRefOrValue:
      title: AttachmentRefOrValue An attachment by value or by reference.
      type: object
      properties:
        attachmentType:
          type: string
          description: Attachment type such as video, picture
        description:
          type: string
          description: A narrative text describing the content of the attachment
        href:
          type: string
          description: URI for this Attachment
        id:
          type: string
          description: Unique identifier for this particular attachment
        isRef:
          type: boolean
          description: is ref
        mimeType:
          type: string
          description: Attachment mime type such as extension file for video, picture
            and document
        name:
          type: string
          description: The name of the attachment
        size:
          $ref: '#/components/schemas/Quantity'
        url:
          type: string
          description: Uniform Resource Locator, is a web page address (a subset of
            URI)
        validFor:
          $ref: '#/components/schemas/TimePeriod'
    CalculateInstallation:
      required:
      - category
      - creationDate
      - externalId
      - orderType
      - originAccessIsExternal
      - poleInfo
      - scoringLevel
      - scoringResult
      type: object
      properties:
        category:
          type: string
          description: Used to categorize the order from a business perspective that
            can be useful for the OM system
          example: installation
        connectionInstallationFlow:
          type: string
          description: Information of the commit installer (INSTALA_TESA, INSTALA_MM)
          example: INSTALA_MM
        creationDate:
          type: string
          description: Provision start date information
          format: date-time
        documentId:
          type: string
          description: Contract document identifier to identify if it's a cableoperator
          example: B02214559
        donorOperator:
          type: string
          description: Donor operator information
          example: "00008"
        externalId:
          type: string
          description: ID given by the consumer (to facilitate searches afterwards)
          example: MYSIM_123456
        linkState:
          type: string
          description: Information on the Busy Pair (PO) of the NEBA fiber
          example: V
        orderType:
          type: string
          description: Installation order type information
          example: Alta FTTH + VOIP
        originAccessIsExternal:
          type: boolean
          description: New numbering sales information with external access origin
            and without transfer of access
          example: false
        poleInfo:
          type: boolean
          description: Pole information
          example: false
        scoringLevel:
          type: integer
          description: It's the risk level of customer fraud. This value for TMS-YOIGO
            comes from ROVE interface, other CRM have differents fraud systems
          format: int8
          example: 1
        scoringResult:
          type: string
          description: It's the overall risk value of customer fraud. This value for
            TMS-YOIGO comes from ROVE interface, other CRM have differents fraud systems
          example: RISK
      description: CalculateInstallation Parameters necessary to calculate the contract,
        delay and duration of an installation
    CalculateInstallationResponse:
      required:
      - contract
      - delay
      - duration
      type: object
      properties:
        contract:
          type: string
          description: It is the result of the contract
          example: YMO/B2B
        delay:
          type: string
          description: It is the result of the delay. Result expressed in number of
            fringes
          example: "14"
        duration:
          type: string
          description: It is the result of the duration. Expressed in minutes
          example: "60"
      description: CalculateInstallationResponse It is the result of the calculation
        of the contract, delay and duration of an installation
    Characteristic:
      title: Characteristic Describes a given characteristic of an object or entity
        through a name/value pair.
      required:
      - name
      - value
      type: object
      properties:
        characteristicRelationship:
          type: array
          description: characteristic relationship
          items:
            $ref: '#/components/schemas/CharacteristicRelationship'
        id:
          type: string
          description: Unique identifier of the characteristic
        name:
          type: string
          description: Name of the characteristic
        value:
          type: string
          description: The value of the characteristic
    CharacteristicRelationship:
      title: CharacteristicRelationship Another Characteristic that is related to
        the current Characteristic;
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the characteristic
        relationshipType:
          type: string
          description: The type of relationship
    ErrorDto:
      type: object
      properties:
        componentMsg:
          type: string
          description: Detailed error message
          example: ID MYSIM_6922893 not exists
        id:
          type: string
          description: Error identifier
          example: MM0000002
        msg:
          type: string
          description: Generic error message
          example: Resource not found
        status:
          type: integer
          format: int64
          description: HTTP error code
          example: 404
      description: ErrorDto defines an extended error
    Note:
      required:
      - author
      - date
      - text
      type: object
      properties:
        author:
          type: string
          description: Author of the note
          example: user@masmovil.com
        date:
          type: string
          description: |-
            Date of the note
            Format: time
          format: date-time
        id:
          type: string
          description: Identifier of the note within its containing entity (may or
            may not be globally unique, depending on provider implementation)
          example: 0181b9de-2a43-40cb-a2fc-ca58b62f4658
        text:
          type: string
          description: Text of the note
          example: A comment
      description: Note Extra information about a given entity
    OrderRelationship:
      title: OrderRelationship Related Entity reference.
      required:
      - id
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of a related entity.
        name:
          type: string
          description: Name of the related entity.
        type:
          type: string
          description: Role played by the related party
    Quantity:
      type: object
      properties:
        amount:
          type: number
          description: Numeric value in a given unit
          format: float
        units:
          type: string
          description: Unit
      description: Quantity An amount in a given unit
    RelatedParty:
      title: RelatedParty Related Entity reference. A related party defines party
        or party role linked to a specific entity.
      required:
      - id
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of a related entity.
        name:
          type: string
          description: Name of the related entity.
        role:
          type: string
          description: Role played by the related party
      example:
        id: Jose Maria
        role: firstName
    Resource:
      type: object
      properties:
        attachment:
          type: array
          description: attachment
          items:
            $ref: '#/components/schemas/AttachmentRefOrValue'
        category:
          type: string
          description: Category of the concrete resource. e.g Gold, Silver for MSISDN
            concrete resource
        description:
          type: string
          description: free-text description of the resource
        id:
          type: string
          description: Identifier of the resource
        name:
          type: string
          description: A string used to give a name to the resource
        note:
          type: array
          description: note
          items:
            $ref: '#/components/schemas/Note'
        resourceCharacteristic:
          type: array
          description: resource characteristic
          items:
            $ref: '#/components/schemas/Characteristic'
        resourceRelationship:
          type: array
          description: resource relationship
          items:
            $ref: '#/components/schemas/ResourceRelationship'
        resourceVersion:
          type: string
          description: A field that identifies the specific version of an instance
            of a resource.
      description: Resource Resource is an abstract entity that describes the common
        set of attributes shared by all concrete resources. The polymorphic attributes
        @type, @schemaLocation & @referredType are related to the Resource entity
        and not the related ResourceRefOrValue class itself
      example: 
        resourceCharacteristic:
        - name: type
          value: MOBILE_LINE
        - name: sim_type
          value: SIM
        - name: tariff
          value: "2003"
        - name: line
          value: new_number
    ResourceOrder:
      type: object
      properties:
        category:
          type: string
          description: Used to categorize the order from a business perspective that
            can be useful for the OM system
          example: installation
        completionDate:
          type: string
          description: |-
            Date when the order was completed
            Format: time
          format: date-time
        description:
          type: string
          description: free-text description firestorehe Resource Order
          example: Mysim Resources
        externalId:
          type: string
          description: ID given by the consumer (to facilitate searches afterwards)
          example: MYSIM_XXXX
        id:
          type: string
          description: Identifier of an instance of the Resource Order. Required to
            be unique within the resource type.  Used in URIs as the identifier for
            specific instances of a type
          example: MYSIM_XXXX
        name:
          type: string
          description: A string used to give a name to the Resource Order
          example: MIG_COM
        note:
          type: array
          description: note
          example:
          - author: name
            date: 2023-04-12T16:42:23Z
            text: A free text detailing the note
          items:
            $ref: '#/components/schemas/Note'
        orderDate:
          type: string
          description: |-
            Date when the order was created
            Format: time
          format: date-time
        orderRelationship:
          type: array
          description: orderRelationship
          example:
          - id: MYSIM_AGILETV_TEST
            type: cross-ref
          items:
            $ref: '#/components/schemas/OrderRelationship'
        priority:
          type: integer
          description: "A way that can be used by consumers to prioritize orders in\
            \ OM system (from 0 to 4 : 0 is the highest priority, and 4 the lowest)"
          format: int64
          example: 2
        relatedParty:
          type: array
          description: related party
          example:
          - id: Jose Maria
            role: firstName
          - id: Pérez Martínez
            role: middleName
          - id: 08946786Q
            role: documentNumber
          - id: jose1965@gmail.com
            role: email
          - id: "626666666"
            role: phoneNumber
          - id: "28013"
            role: zipcode
          - id: mysim
            role: sellchannel
          - id: mysim
            role: seller
          - id: Residencial
            role: segment
          - id: "2"
            role: tenant
          - id: es_ES
            role: language
          items:
            $ref: '#/components/schemas/RelatedParty'
        resourceOrderItem:
          type: array
          description: resourceOrderItem
          example:
          - action: add
            id: 02e82ded-5b94-ea11-a811-000d3ab9bba9
            resource:
              resourceCharacteristic:
              - name: type
                value: FTTH
              - name: territoryOwner
                value: NEBA
            state: InProgress
          - action: add
            id: f7e72ded-5b94-ea11-a811-000d3ab9bba9
            resource:
              resourceCharacteristic:
              - name: type
                value: STB
              - name: model
                value: Oxygen 101 S
            state: InProgress
          - action: add
            id: ffe72ded-5b94-ea11-a811-000d3ab9bba9
            resource:
              resourceCharacteristic:
              - name: type
                value: MOBILE_LINE
              - name: sim_type
                value: SIM
              - name: tariff
                value: "2003"
              - name: line
                value: new_number
            state: InProgress
          items:
            $ref: '#/components/schemas/ResourceOrderItem'
        startDate:
          type: string
          description: |-
            Date when the order was actually started
            Format: time
          format: date-time
        state:
          type: string
          description: The life cycle state of the resource
          example: Acknowledged
        substate:
          type: string
          description: The life cycle substate of the resource
          example: A definir por FSM
        ticketingSection:
          $ref: '#/components/schemas/TicketingSection'
        type:
          type: string
          description: Name of the Resource Order type
          example: Alta FTTH + VOIP
      description: ResourceOrder A Resource Order is a request to provision a set
        of Resources (logical and physical) triggered by the request to provision
        a Service through a Service Order
    ResourceOrderItem:
      title: ResourceOrderItem An identified part of the order. A resource order is
        decomposed into one or more order items.
      type: object
      properties:
        action:
          type: string
          description: Can be "add" / "modify" / "no_change"/ "delete"/ "picking"/
            "picked"/ "unpicking"/ "unpicked"
        appointment:
          $ref: '#/components/schemas/AppointmentRef'
        description:
          type: string
          description: free-text description of the Resource Order Item
        href:
          type: string
          description: The URI for the object itself.
        id:
          type: string
          description: Identifier of the line item (generally it is a sequence number
            01, 02, 03, ...)
        resource:
          $ref: '#/components/schemas/Resource'
        state:
          type: string
          description: 'State of the order item : described in the state machine diagram'
        ticketingSection:
          $ref: '#/components/schemas/TicketingSection'
    ResourceRelationship:
      required:
      - resource
      - type
      type: object
      properties:
        resource:
          $ref: '#/components/schemas/ResourceOrderItem'
        type:
          type: string
          description: relationship type
      description: ResourceRelationship resource relationship
    TicketingSection:
      required:
      - category
      - process
      - subcategory
      type: object
      properties:
        category:
          type: string
          description: Appointment, installation, data, commercial and closing will
            be indicated, these are the 5 types of incident that can be opened and
            that affect the installation
          example: Datos
        process:
          type: string
          description: Process information. For now there will always be incidence
          example: Incidencia
        subcategory:
          type: string
          description: Multiple values will arrive in this field. They are what we
            call opening reasons, which are drop-down that are shown to the technician
            at the installation and depend on the category, that is, each category
            has its own reasons and they are the ones that will arrive in this field
          example: Dirección Incorrecta
      description: TicketingSection information for managing the opening of incidents
        in +Ticketing
    TimePeriod:
      type: object
      properties:
        endDateTime:
          type: string
          description: |-
            End of the time period, using IETC-RFC-3339 format
            Format: time
          format: date-time
        startDateTime:
          type: string
          description: |-
            Start of the time period, using IETC-RFC-3339 format. If you define a start, you must also define an end
            Format: time
          format: date-time
      description: TimePeriod A period of time, either as a deadline (endDateTime
        only) a startDateTime only, or both
    HistoryEntry:
      type: object
      properties:
        workOrderId:
          type: string
        state:
          type: string
        fullState:
          type: string
        tenant:
          type: string
        timestamp:
          type: string
          format: date-time
        resourceCharacteristics:
          type: object
        completionDate:
          type: string
          format: date-time
        appointment:
          type: object
      example:
        workOrderId: "WD_12168414"
        state: "Completed"
        fullState: "INSTALACIÓN COMPLETADA"
        tenant: "orange"
        timestamp: "2026-02-26T14:00:00Z"
        resourceCharacteristics:
          id: "65146468"
          state: "Completed"
          technology: "FTTH"
        completionDate: "2026-02-26T14:00:00Z"
    InstallationPartResponse:
      type: object
      required: [workOrderId, url]
      properties:
        workOrderId:
          type: string
          description: Work order identifier
          example: "WD_10376072"
        documentId:
          type: string
          nullable: true
          description: Document ID in +documents system (null for FSM legacy)
          example: inst.rLXRuKcoj5K6RzhE.HHbXrwNVKHyB0FlhLrN5TGBoQnC7_2NHZ7eRn0nxK05Qn1TUX846mQMadX8qGMA-lF_TGZV7quKWkLTCoEpMrkDU1Be-6Hw9VihT5f-ep-5wehL2n3mf2XCAeVsiEIdRfDjyHSpVfFtl_KAFV7O7j2udBbnOB8XTR50XS5emFZ6lA6gfEDeRssJpxze9fRlJVsA9cEoJyJdYR_IrGQI
        url:
          type: string
          format: uri
          description: URL to access the installation part PDF
          example: "https://masmovil.kairos365.com/forms/12345"
    BackendException:
      type: object
      properties:
        code:
          type: string
          description: error code.
          example: "0001"
        status:
          type: string
          description: error status.
          example: "NOT_FOUND"
        message:
          type: string
          description: error message.
          example: "Resource Not Found"
        detailMsg:
          type: string
          description: error message obtained in the response.
          example: "Work order 'WD_99999999' not found"
    NotesResult:
      type: object
      required: [workOrderId, notes]
      properties:
        workOrderId:
          type: string
          description: Work order identifier
          example: "MYSIM_12168414"
        notes:
          type: array
          description: List of notes extracted from the work order, sorted chronologically (oldest first)
          items:
            $ref: '#/components/schemas/NoteEntry'
      example:
        workOrderId: "MYSIM_12168414"
        notes:
          - author: "G537"
            message: "cierre de la instalacion"
            source: "RESOURCE_ORDER"
            date: "2026-01-08T18:47:09Z"
          - author: "SYSTEM"
            message: "AÑADIMOS COMENTARIOS TRAS LA INSTALACION DE LA FIBRA OK"
            source: "RESOURCE_ORDER"
            date: "2026-03-10T09:03:30Z"
    NoteEntry:
      type: object
      required: [author, message, source, date]
      properties:
        author:
          type: string
          description: Author of the note. Can be technician code (e.g., G537, E438), user identifier, or SYSTEM for automated notes.
          example: "G537"
        message:
          type: string
          description: The extracted message content. Can come from various JSON fields (description, summary, Comentarios, etc.) or plain text.
          example: "cierre de la instalacion"
        source:
          type: string
          description: Source of the note, currently always RESOURCE_ORDER
          example: "RESOURCE_ORDER"
        date:
          type: string
          format: date-time
          description: Date and time when the note was created, in ISO-8601 format
          example: "2026-01-08T18:47:09Z"
      example:
        author: "G537"
        message: "Installation completed successfully"
        source: "RESOURCE_ORDER"
        date: "2026-01-08T18:47:09Z"
  securitySchemes:
    Bearer:
      type: apiKey
      name: Authorization
      in: header