openapi: 3.0.3
info:
  title: MasProvision API
  version: 1.22.0
  description: >
    ### Release Notes

    * **1.22.0**
        - Added Agile TV customers addresses endpoint

    * **1.21.1**
        - Update tesamanager endpoints
    * **1.21.0**
        - Update tesamanager endpoints
    * **1.20.0**
        - Update mobile-api validations
    * **1.19.0**
        - Update mobile-api validations
    * **1.18.0**
        - Update mobile-api validations
    * **1.17.0**
        - Update mobile-api requests
    * **1.16.0**
        - Add mobile-api endpoints
    * **1.15.0**
        - Update tesamanager endpoints
    * **1.14.0**
        - Removed mobile-router endpoints
     * **1.13.1**
        - Provision OrangeTV updated endpoints to latest

    * **1.13.0**
        - Added TESA endpoints
    
    * **1.12.0**
        - Added Orange TV endpoints
    
    * **1.11.0**
        - Added device insurance endpoints
    
    * **1.10.2**
        - Added orgId to path params in Bonus Activate endpoint
    
    * **1.10.1**
        - Added Provision mobile-router endpoint to Bonus Activate
    
    * **1.10.0**
        - Provision mobile-router endpoint
    
    * **1.9.1**
        - Make destinationIua optional in ftth accesses retentions request
    
    * **1.9.0**
        - Add addressId to ftth accesses query request
    
    * **1.8.1**
        - Ftth accesses retentions endpoint
    
    * **1.8.0**
        - Provision TV HBO

    * **1.7.0**
        - Provision ftth accesses endpoint

    * **1.6.0**
        - Provision TV Netflix - Status endpoint

    * **1.5.0**
        - Provision TV Amazon - Amazon account recovery url generation endpoint
    
    * **1.4.0**
        - Provision TV Amazon - Get Amazon bundle info endpoint

    * **1.3.0**
        - Provision TV Netflix - Suspend and unsuspend endpoints

    * **1.2.0**
        - Provision TV Netflix - New endpoint to update Netflix subscription

    * **1.1.0**
        - Provision TV Netflix

    * **1.0.0**
        - Provision TV Amazon
    
    ## Release and compatibility
    
    - Deprecations for current versions whenever a new version is announced is 1 months.

    - After 1 months, the deprecated version will no longer be supported but will remain accessible for at least 3 months.
    
    - Our APIs will allow requests only from two versions simultaneously, however we won't support the older of the two.
    
    - All enum in responses are define as x-extensible-enum, it means they all are susceptible to increase values.
    
    ## Version criteria
    
    ```
    {MAJOR}.{MINOR}.{PATCH}
    ```
    
    1. `{MAJOR}` implies incompatible changes with the previous `{MAJOR}` version
    
    
    2. `{MINOR}` implies new functionalities or information compatible with previous version
    
    
    3. `{PATCH}` implies bug fixes compatible with previous version

servers:
  - url: https://provision-master.private.dev.k8s.masmovil.com/v1
    description: development
  - url: https://provision.sta.masstack.com/v1
    description: staging
  - url: https://provision.masstack.com/v1
    description: production
tags:
  - name: Provision TV Amazon
    description: Amazon provides the ability to offer your customers the option to subscribe to Amazon services with the convenience of payments through your billing systems. Customers receive entitlement to the subscribed services when they complete the sign-up process. Customers can cancel services at any time by contacting their mobile service provider.
  - name: Provision TV Netflix
    description: The Netflix bundle program allows your customers to purchase an offer which includes Netflix through your standard sales channels. Once purchased, customers can link a new or existing Netflix account to your bundle offer through the Web or Set-Top Box activation channels.
  - name: Provision TV HBO
    description: HBO (Warner Bros. Discovery. WBD) provides users access to WBD content across various application and platform combinations including mobile devices, smart TVs, and desktop computers. A direct integration provides opportunities for partners to enhance their digital experiences for their existing users or to make digital offerings available for new users.
  - name: Provision FTTH
    description: The FTTH API provide different endpoint to query information on the network. The api return information relationship the service that you are looking up.
  - name: Provision Orange TV
    description: This API is used to manage subscriptions, customers, and devices for Orange TV.
  - name: Tesamanager
    description: API to create and get TESA request.
  - name: Mobile
    description: This API manages mobile device provisioning requests.
  - name: Provision TV Agile Facade
    description: Facade endpoints for the Agile TV provider. Receives inbound calls from Agile TV and exposes customer data queries.

paths:
  /tv/amazon/orgs/{org_id}/bundles/{bundle_id}:
    get:
      tags:
        - Provision TV Amazon
      summary: Retrieve details of certain bundle
      description: Retrieve details of certain bundle
      operationId: amazonGetBundleDetails
      parameters:
        - $ref: '#/components/parameters/Request-Correlation-Id'
        - $ref: '#/components/parameters/OrgId'
        - $ref: '#/components/parameters/AmazonBundleId'
      responses:
        "200":
          description: Success
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AmazonGetBundleDetailsResponse'
        "401":
          description: Unauthorized request
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: UNAUTHORIZED
                  title: Unauthorized
                  ref: https://developers.masstack.com/en/docs/apis_provision_doc_swagger/1/provisiontvamazon
                  details: Authorization failed
        "400":
          description: Bad Request
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: BAD_REQUEST
                  title: Bad request
                  ref: https://developers.masstack.com/en/docs/apis_provision_doc_swagger/1/provisiontvamazon
                  details: bundleId must not be empty
        "404":
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: BUNDLE_NOT_FOUND
                  title: Not found
                  details: Bundle '123' not found
        "500":
          description: Internal Server Error
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: INTERNAL_ERROR
                  title: Internal server error
                  ref: https://developers.masstack.com/en/docs/apis_provision_doc_swagger/1/provisiontvamazon
                  details: Cannot process the request due to an unexpected error
  /tv/amazon/orgs/{org_id}/subscriptions:
    post:
      tags:
        - Provision TV Amazon
      summary: Create an Amazon bundle subscription
      description: Create an Amazon bundle subscription
      operationId: amazonCreateSubscription
      parameters:
        - $ref: '#/components/parameters/Request-Correlation-Id'
        - $ref: '#/components/parameters/OrgId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AmazonCreateSubscription'
        required: true
      responses:
        "202":
          description: Entitlement offer request accepted for future processing.
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
        "400":
          description: Bad Request
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: BAD_REQUEST
                  title: Bad request
                  ref: https://developers.masstack.com/en/docs/apis_provision_doc_swagger/1/provisiontvamazon
                  details: Missing billing identity
        "401":
          description: Unauthorized request
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: UNAUTHORIZED
                  title: Unauthorized
                  ref: https://developers.masstack.com/en/docs/apis_provision_doc_swagger/1/provisiontvamazon
                  details: Authorization failed
        "500":
          description: Internal Server Error
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: INTERNAL_ERROR
                  title: Internal server error
                  ref: https://developers.masstack.com/en/docs/apis_provision_doc_swagger/1/provisiontvamazon
                  details: Cannot process the request due to an unexpected error
  /tv/amazon/orgs/{org_id}/subscriptions/{subscription_id}:
    get:
      tags:
        - Provision TV Amazon
      summary: Retrieve details of certain subscription
      description: Retrieve details of certain subscription
      operationId: amazonGetSubscriptionDetails
      parameters:
        - $ref: '#/components/parameters/Request-Correlation-Id'
        - $ref: '#/components/parameters/OrgId'
        - $ref: '#/components/parameters/AmazonSubscriptionId'
      responses:
        "200":
          description: Success
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AmazonGetSubscriptionDetailsResponse'
        "401":
          description: Unauthorized request
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: UNAUTHORIZED
                  title: Unauthorized
                  ref: https://developers.masstack.com/en/docs/apis_provision_doc_swagger/1/provisiontvamazon
                  details: Authorization failed
        "400":
          description: Bad Request
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: BAD_REQUEST
                  title: Bad request
                  ref: https://developers.masstack.com/en/docs/apis_provision_doc_swagger/1/provisiontvamazon
                  details: subscriptionId must not be empty
        "404":
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: SUBSCRIPTION_NOT_FOUND
                  title: Not found
                  details: Subscription '123' not found
        "500":
          description: Internal Server Error
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: INTERNAL_ERROR
                  title: Internal server error
                  ref: https://developers.masstack.com/en/docs/apis_provision_doc_swagger/1/provisiontvamazon
                  details: Cannot process the request due to an unexpected error
    patch:
      tags:
        - Provision TV Amazon
      summary: Update an Amazon bundle subscription
      description: Update an Amazon bundle subscription
      operationId: amazonUpdateSubscription
      parameters:
        - $ref: '#/components/parameters/Request-Correlation-Id'
        - $ref: '#/components/parameters/OrgId'
        - $ref: '#/components/parameters/AmazonSubscriptionId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AmazonUpdateSubscription'
        required: true
      responses:
        "202":
          description: Bundle update request accepted for future processing.
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
        "400":
          description: Bad Request
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: BAD_REQUEST
                  title: Bad request
                  ref: https://developers.masstack.com/en/docs/apis_provision_doc_swagger/1/provisiontvamazon
                  details: product is a required field
        "401":
          description: Unauthorized request
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: UNAUTHORIZED
                  title: Unauthorized
                  ref: https://developers.masstack.com/en/docs/apis_provision_doc_swagger/1/provisiontvamazon
                  details: Authorization failed
        "500":
          description: Internal Server Error
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: INTERNAL_ERROR
                  title: Internal server error
                  ref: https://developers.masstack.com/en/docs/apis_provision_doc_swagger/1/provisiontvamazon
                  details: Cannot process the request due to an unexpected error
  /tv/amazon/orgs/{org_id}/subscriptions/{subscription_id}/cancel:
    put:
      tags:
        - Provision TV Amazon
      summary: Cancel an Amazon bundle subscription
      description: Cancel an Amazon bundle subscription
      operationId: amazonCancelSubscription
      parameters:
        - $ref: '#/components/parameters/Request-Correlation-Id'
        - $ref: '#/components/parameters/OrgId'
        - $ref: '#/components/parameters/AmazonSubscriptionId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AmazonCancelSubscription'
        required: true
      responses:
        "202":
          description: Bundle cancellation request accepted for future processing.
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
        "400":
          description: Bad Request
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: BAD_REQUEST
                  title: Bad request
                  ref: https://developers.masstack.com/en/docs/apis_provision_doc_swagger/1/provisiontvamazon
                  details: reason is a required field
        "401":
          description: Unauthorized request
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: UNAUTHORIZED
                  title: Unauthorized
                  ref: https://developers.masstack.com/en/docs/apis_provision_doc_swagger/1/provisiontvamazon
                  details: Authorization failed
        "500":
          description: Internal Server Error
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: INTERNAL_ERROR
                  title: Internal server error
                  ref: https://developers.masstack.com/en/docs/apis_provision_doc_swagger/1/provisiontvamazon
                  details: Cannot process the request due to an unexpected error
  /tv/amazon/orgs/{org_id}/subscriptions/{subscription_id}/suspend:
    put:
      tags:
        - Provision TV Amazon
      summary: Suspend an Amazon active bundle subscription
      description: Suspend an Amazon active bundle subscription
      operationId: amazonSuspendSubscription
      parameters:
        - $ref: '#/components/parameters/Request-Correlation-Id'
        - $ref: '#/components/parameters/OrgId'
        - $ref: '#/components/parameters/AmazonSubscriptionId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AmazonSuspendSubscription'
        required: true
      responses:
        "202":
          description: Bundle suspension request accepted for future processing.
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
        "400":
          description: Bad Request
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: BAD_REQUEST
                  title: Bad request
                  ref: https://developers.masstack.com/en/docs/apis_provision_doc_swagger/1/provisiontvamazon
                  details: external_id is a required field
        "401":
          description: Unauthorized request
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: UNAUTHORIZED
                  title: Unauthorized
                  ref: https://developers.masstack.com/en/docs/apis_provision_doc_swagger/1/provisiontvamazon
                  details: Authorization failed
        "500":
          description: Internal Server Error
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: INTERNAL_ERROR
                  title: Internal server error
                  ref: https://developers.masstack.com/en/docs/apis_provision_doc_swagger/1/provisiontvamazon
                  details: Cannot process the request due to an unexpected error
  /tv/amazon/orgs/{org_id}/subscriptions/{subscription_id}/resume:
    put:
      tags:
        - Provision TV Amazon
      summary: Resume a previously suspended Amazon bundle subscription
      description: Resume a previously suspended Amazon bundle subscription
      operationId: amazonResumeSubscription
      parameters:
        - $ref: '#/components/parameters/Request-Correlation-Id'
        - $ref: '#/components/parameters/OrgId'
        - $ref: '#/components/parameters/AmazonSubscriptionId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AmazonResumeSubscription'
        required: true
      responses:
        "202":
          description: Bundle resume request accepted for future processing.
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
        "400":
          description: Bad Request
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: BAD_REQUEST
                  title: Bad request
                  ref: https://developers.masstack.com/en/docs/apis_provision_doc_swagger/1/provisiontvamazon
                  details: external_id is a required field
        "401":
          description: Unauthorized request
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: UNAUTHORIZED
                  title: Unauthorized
                  ref: https://developers.masstack.com/en/docs/apis_provision_doc_swagger/1/provisiontvamazon
                  details: Authorization failed
        "500":
          description: Internal Server Error
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: INTERNAL_ERROR
                  title: Internal server error
                  ref: https://developers.masstack.com/en/docs/apis_provision_doc_swagger/1/provisiontvamazon
                  details: Cannot process the request due to an unexpected error
  /tv/amazon/orgs/{org_id}/subscriptions/{subscription_id}/activation-url:
    post:
      tags:
        - Provision TV Amazon
      summary: Generate activation URL
      description: Generate an activation URL to redirect to an Amazon flow
      operationId: amazonGenerateActivationUrl
      parameters:
        - $ref: '#/components/parameters/Request-Correlation-Id'
        - $ref: '#/components/parameters/OrgId'
        - $ref: '#/components/parameters/AmazonSubscriptionId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AmazonGenerateActivationUrl'
        required: true
      responses:
        "200":
          description: Activation URL successfully generated.
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AmazonGenerateActivationURLResponse'
        "400":
          description: Bad Request
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: BAD_REQUEST
                  title: Bad request
                  ref: https://developers.masstack.com/en/docs/apis_provision_doc_swagger/1/provisiontvamazon
                  details: 'validity_duration_minutes: Value must be between 15 and 60 minutes'
        "401":
          description: Unauthorized request
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: UNAUTHORIZED
                  title: Unauthorized
                  ref: https://developers.masstack.com/en/docs/apis_provision_doc_swagger/1/provisiontvamazon
                  details: Authorization failed
        "500":
          description: Internal Server Error
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: INTERNAL_ERROR
                  title: Internal server error
                  ref: https://developers.masstack.com/en/docs/apis_provision_doc_swagger/1/provisiontvamazon
                  details: Cannot process the request due to an unexpected error
  /tv/amazon/orgs/{org_id}/subscriptions/{subscription_id}/account-recovery-url:
    post:
      tags:
        - Provision TV Amazon
      summary: Generate account recovery URL
      description: Generate an account recovery URL to recover an Amazon account
      operationId: amazonAccountRecoveryUrlGenerate
      parameters:
        - $ref: '#/components/parameters/Request-Correlation-Id'
        - $ref: '#/components/parameters/OrgId'
        - $ref: '#/components/parameters/AmazonSubscriptionId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AmazonGenerateAccountRecoveryUrl'
        required: true
      responses:
        "202":
          description: Account Recovery URL successfully generated.
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
        "400":
          description: Bad Request
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: BAD_REQUEST
                  title: Bad request
                  ref: https://developers.masstack.com/en/docs/apis_provision_doc_swagger/1/provisiontvamazon
                  details: Missing billing identity
        "401":
          description: Unauthorized request
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: UNAUTHORIZED
                  title: Unauthorized
                  ref: https://developers.masstack.com/en/docs/apis_provision_doc_swagger/1/provisiontvamazon
                  details: Authorization failed
        "500":
          description: Internal Server Error
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: INTERNAL_ERROR
                  title: Internal server error
                  ref: https://developers.masstack.com/en/docs/apis_provision_doc_swagger/1/provisiontvamazon
                  details: Cannot process the request due to an unexpected error

  /tv/netflix/orgs/{org_id}/subscriptions:
    post:
      tags:
        - Provision TV Netflix
      summary: Create a Netflix bundle subscription
      description: Create a Netflix bundle subscription
      operationId: netflixCreateSubscription
      parameters:
        - $ref: '#/components/parameters/OrgId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NetflixCreateSubscription'
        required: true
      responses:
        "201":
          description: Enrolled in the entitlement offer successfully.
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NetflixCreateSubscriptionResponse'
        "400":
          description: Bad Request
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: BadNetflixOfferID
                  title: BadNetflixOfferID
                  ref: https://developers.masstack.com/en/docs/apis_provision_doc_swagger/1/provisiontvnetflix
                  details: The NetflixOfferID passed was not valid.
        "401":
          description: Unauthorized request
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: UNAUTHORIZED
                  title: Unauthorized
                  ref: https://developers.masstack.com/en/docs/apis_provision_doc_swagger/1/provisiontvnetflix
                  details: Authorization failed
        "409":
          description: Conflict
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: PAIAlreadyEnrolledWithPartner
                  title: PAIAlreadyEnrolledWithPartner
                  ref: https://developers.masstack.com/en/docs/apis_provision_doc_swagger/1/provisiontvnetflix
                  details: Bundle customer with the supplied PAI is already enrolled with this partner.
        "500":
          description: Internal Server Error
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: INTERNAL_ERROR
                  title: Internal server error
                  ref: https://developers.masstack.com/en/docs/apis_provision_doc_swagger/1/provisiontvnetflix
                  details: Cannot process the request due to an unexpected error
  /tv/netflix/orgs/{org_id}/subscriptions/{subscription_id}:
    patch:
      tags:
        - Provision TV Netflix
      summary: Update Netflix bundle subscription
      description: Update Netflix bundle subscription
      operationId: netflixUpdateSubscription
      parameters:
        - $ref: '#/components/parameters/OrgId'
        - $ref: '#/components/parameters/NetflixSubscriptionId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NetflixUpdateSubscription'
        required: true
      responses:
        "204":
          description: Bundle updated successfully.
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
        "400":
          description: Bad Request
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: BadNetflixOfferID
                  title: BadNetflixOfferID
                  ref: https://developers.masstack.com/en/docs/apis_provision_doc_swagger/1/provisiontvnetflix
                  details: The NetflixOfferID passed was not valid.
        "401":
          description: Unauthorized request
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: UNAUTHORIZED
                  title: Unauthorized
                  ref: https://developers.masstack.com/en/docs/apis_provision_doc_swagger/1/provisiontvnetflix
                  details: Authorization failed
        "404":
          description: Bundle not found
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: BundleNotFound
                  title: BundleNotFound
                  ref: https://developers.masstack.com/en/docs/apis_provision_doc_swagger/1/provisiontvnetflix
                  details: Bundle customer not found for the supplied PAI.
        "500":
          description: Internal Server Error
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: INTERNAL_ERROR
                  title: Internal server error
                  ref: https://developers.masstack.com/en/docs/apis_provision_doc_swagger/1/provisiontvnetflix
                  details: Cannot process the request due to an unexpected error
  /tv/netflix/orgs/{org_id}/subscriptions/{subscription_id}/cancel:
    put:
      tags:
        - Provision TV Netflix
      summary: Cancel Netflix a bundle subscription
      description: Cancel Netflix a bundle subscription
      operationId: netflixCancelSubscription
      parameters:
        - $ref: '#/components/parameters/OrgId'
        - $ref: '#/components/parameters/NetflixSubscriptionId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NetflixCancelSubscription'
        required: true
      responses:
        "204":
          description: Canceled entitlement offer successfully.
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
        "400":
          description: Bad Request
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: BadReason
                  title: BadReason
                  ref: https://developers.masstack.com/en/docs/apis_provision_doc_swagger/1/provisiontvnetflix
                  details: Reason was not passed in or is not a value defined in the enumeration.
        "401":
          description: Unauthorized request
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: UNAUTHORIZED
                  title: Unauthorized
                  ref: https://developers.masstack.com/en/docs/apis_provision_doc_swagger/1/provisiontvnetflix
                  details: Authorization failed
        "404":
          description: Bundle not found
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: BundleNotFound
                  title: BundleNotFound
                  ref: https://developers.masstack.com/en/docs/apis_provision_doc_swagger/1/provisiontvnetflix
                  details: Bundle customer not found for the supplied PAI.
        "500":
          description: Internal Server Error
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: INTERNAL_ERROR
                  title: Internal server error
                  ref: https://developers.masstack.com/en/docs/apis_provision_doc_swagger/1/provisiontvnetflix
                  details: Cannot process the request due to an unexpected error
  /tv/netflix/orgs/{org_id}/subscriptions/{subscription_id}/geturl:
    post:
      tags:
        - Provision TV Netflix
      summary: Generate a url with token to be used in the redirect link to a Netflix flow
      description: Generate a url with token to be used in the redirect link to a Netflix flow
      operationId: netflixGenerateUrl
      parameters:
        - $ref: '#/components/parameters/OrgId'
        - $ref: '#/components/parameters/NetflixSubscriptionId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NetflixGenerateUrl'
        required: true
      responses:
        "201":
          description: New url with token was created successfully.
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NetflixGenerateUrlResponse'
        "400":
          description: Bad Request
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: BadTokenType
                  title: BadTokenType
                  ref: https://developers.masstack.com/en/docs/apis_provision_doc_swagger/1/provisiontvnetflix
                  details: TokenType was not passed in or was not a valid value.
        "401":
          description: Unauthorized request
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: UNAUTHORIZED
                  title: Unauthorized
                  ref: https://developers.masstack.com/en/docs/apis_provision_doc_swagger/1/provisiontvnetflix
                  details: Authorization failed
        "500":
          description: Internal Server Error
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: INTERNAL_ERROR
                  title: Internal server error
                  ref: https://developers.masstack.com/en/docs/apis_provision_doc_swagger/1/provisiontvnetflix
                  details: Cannot process the request due to an unexpected error
  /tv/netflix/orgs/{org_id}/subscriptions/{subscription_id}/suspend:
    post:
      tags:
        - Provision TV Netflix
      summary: Suspend a netflix subscription
      description: Suspend subscription
      operationId: suspend
      parameters:
        - $ref: '#/components/parameters/OrgId'
        - $ref: '#/components/parameters/NetflixSubscriptionId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NetflixSuspend'
        required: true
      responses:
        "204":
          description: Suspend done successfully.
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
        "400":
          description: Bad Request
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: BundleAlreadySuspended
                  title: BundleAlreadySuspended
                  ref: https://developers.masstack.com/en/docs/apis_provision_doc_swagger/1/provisiontvnetflix
                  details: Bundle customer with the supplied PAI has already been suspended
        "401":
          description: Unauthorized request
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: UNAUTHORIZED
                  title: Unauthorized
                  ref: https://developers.masstack.com/en/docs/apis_provision_doc_swagger/1/provisiontvnetflix
                  details: Authorization failed
        "500":
          description: Internal Server Error
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: INTERNAL_ERROR
                  title: Internal server error
                  ref: https://developers.masstack.com/en/docs/apis_provision_doc_swagger/1/provisiontvnetflix
                  details: Cannot process the request due to an unexpected error
  /tv/netflix/orgs/{org_id}/subscriptions/{subscription_id}/unsuspend:
    post:
      tags:
        - Provision TV Netflix
      summary: Unsuspend a suspended netflix subscription
      description: Unsuspend subscription
      operationId: unsuspend
      parameters:
        - $ref: '#/components/parameters/OrgId'
        - $ref: '#/components/parameters/NetflixSubscriptionId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NetflixUnsuspend'
        required: true
      responses:
        "204":
          description: Unsuspend done successfully.
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
        "400":
          description: Bad Request
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: BundleAlreadyActive
                  title: BundleAlreadyActive
                  ref: https://developers.masstack.com/en/docs/apis_provision_doc_swagger/1/provisiontvnetflix
                  details: Bundle customer with the supplied PAI is already active.
        "401":
          description: Unauthorized request
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: UNAUTHORIZED
                  title: Unauthorized
                  ref: https://developers.masstack.com/en/docs/apis_provision_doc_swagger/1/provisiontvnetflix
                  details: Authorization failed
        "500":
          description: Internal Server Error
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: INTERNAL_ERROR
                  title: Internal server error
                  ref: https://developers.masstack.com/en/docs/apis_provision_doc_swagger/1/provisiontvnetflix
                  details: Cannot process the request due to an unexpected error
  /tv/netflix/orgs/{org_id}/subscriptions/events:
    get:
      tags:
        - Provision TV Netflix
      summary: Provide events concerning the account lifecycle of Netflix members
      description: The API provides "At least once" delivery semantics i.e. duplicate events may be returned across pages/dates.
      operationId: netflixFetchSubscriptionEvents
      parameters:
        - $ref: '#/components/parameters/OrgId'
        - $ref: '#/components/parameters/NetflixEventsQueryStartTimestamp'
        - $ref: '#/components/parameters/NetflixEventsQueryEndTimestamp'
        - $ref: '#/components/parameters/NetflixEventsQueryOffset'
        - $ref: '#/components/parameters/NetflixEventsQueryEventTypes'
      responses:
        "200":
          description: Success
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NetflixFetchSubscriptionEventsResponse'
        "400":
          description: Bad Request
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: BadStartTimestamp
                  title: BadStartTimestamp
                  ref: https://developers.masstack.com/en/docs/apis_provision_doc_swagger/1/provisiontvnetflix
                  details: The startTimestamp value is not provided or not valid or not in the supported time period.
        "401":
          description: Unauthorized request
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: UNAUTHORIZED
                  title: Unauthorized
                  ref: https://developers.masstack.com/en/docs/apis_provision_doc_swagger/1/provisiontvnetflix
                  details: Authorization failed
        "500":
          description: Internal Server Error
          headers:
            X-B3-TraceId:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: INTERNAL_ERROR
                  title: Internal server error
                  ref: https://developers.masstack.com/en/docs/apis_provision_doc_swagger/1/provisiontvnetflix
                  details: Cannot process the request due to an unexpected error
  /tv/netflix/orgs/{org_id}/subscriptions/{subscription_id}/status:
    get:
      tags:
        - Provision TV Netflix
      summary: Provide status of Netflix subscription
      description: The API provides status of Netflix subscription.
      operationId: getSubscriptionStatus
      parameters:
        - $ref: '#/components/parameters/OrgId'
        - $ref: '#/components/parameters/NetflixSubscriptionId'
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NetflixGetSubscriptionStatusResponse'
        "400":
          description: Bad Request
          headers:
            X-B3-TraceID:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: BadStartTimestamp
                  title: BadStartTimestamp
                  ref: https://developers.masstack.com/en/docs/apis_provision_doc_swagger/1/provisiontvnetflix
                  details: The startTimestamp value is not provided or not valid or not in the supported time period.
        "401":
          description: Unauthorized request
          headers:
            X-B3-TraceID:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: UNAUTHORIZED
                  title: Unauthorized
                  ref: https://developers.masstack.com/en/docs/apis_provision_doc_swagger/1/provisiontvnetflix
                  details: Authorization failed
        "500":
          description: Internal Server Error
          headers:
            X-B3-TraceID:
              $ref: '#/components/headers/X-B3-TraceId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: INTERNAL_ERROR
                  title: Internal server error
                  ref: https://developers.masstack.com/en/docs/apis_provision_doc_swagger/1/provisiontvnetflix
                  details: Cannot process the request due to an unexpected error

  /tv/hbo/orgs/{org_id}/subscriptions:
    post:
      tags:
        - Provision TV HBO
      summary: Create a subscription
      description: Create a subscription
      operationId: createSubscription
      parameters:
        - $ref: '#/components/parameters/OrgId'
        - $ref: '#/components/parameters/Request-Correlation-Id'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HboCreateSubscription'
        required: true
      responses:
        "202":
          description: The operation request was successfully accepted, returned the request external reference identifier.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HboCreateSubscriptionResponse'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: BadHBOProductCode
                  title: BadHBOProductCode
                  details: The product_code passed was not valid.
        "401":
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: UNAUTHORIZED
                  title: Unauthorized
                  details: Authorization failed
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: INTERNAL_ERROR
                  title: Internal server error
                  details: Cannot process the request due to an unexpected error
  /tv/hbo/orgs/{org_id}/subscriptions/{subscription_id}/cancel:
    put:
      tags:
        - Provision TV HBO
      summary: Cancel a subscription
      description: Cancel a subscription
      operationId: cancelSubscription
      parameters:
        - $ref: '#/components/parameters/OrgId'
        - $ref: '#/components/parameters/HboSubscriptionId'
        - $ref: '#/components/parameters/Request-Correlation-Id'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HboCancelSubscription'
        required: true
      responses:
        "202":
          description: The cancel operation request was successfully accepted, returned the request external reference identifier.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HboCancelSubscriptionResponse'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: REASON_INVALID
                  title: Reason invalid
                  details: The reason passed was not valid.
        "401":
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: UNAUTHORIZED
                  title: Unauthorized
                  details: Authorization failed
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: INTERNAL_ERROR
                  title: Internal server error
                  details: Cannot process the request due to an unexpected error
  /tv/hbo/orgs/{org_id}/subscriptions/{subscription_id}/activation-url:
    post:
      tags:
        - Provision TV HBO
      summary: Generate activation URL
      description: Generate an activation URL to redirect to an HBO flow
      operationId: generateActivationUrl
      parameters:
        - $ref: '#/components/parameters/OrgId'
        - $ref: '#/components/parameters/HboSubscriptionId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HboGenerateActivationUrl'
        required: true
      responses:
        "200":
          description: Activation URL successfully generated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HboGenerateActivationURLResponse'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: BAD_REQUEST
                  title: Bad request
                  details: 'Missing required parameter external_id'
        "401":
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: UNAUTHORIZED
                  title: Unauthorized
                  details: Authorization failed
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: INTERNAL_ERROR
                  title: Internal server error
                  details: Cannot process the request due to an unexpected error

  /tv/agile/orgs/{org_id}/customers/addresses:
    get:
      tags:
        - Provision TV Agile Facade
      summary: Retrieve installation addresses by user
      description: >
        Given a user identifier (email or other identifier depending on the customer stack),
        it resolves the associated customer, retrieves their active broadband accounts and subscriptions,
        and returns the list of installation addresses with their corresponding service_id.
      operationId: agileGetAddressesByUser
      parameters:
        - $ref: '#/components/parameters/Request-Correlation-Id'
        - in: path
          name: org_id
          required: true
          description: Brand identifier.
          schema:
            type: string
        - in: query
          name: user
          required: true
          description: Customer identifier (email) to search for installation addresses.
          schema:
            type: string
          example: "customer@example.com"
      responses:
        '200':
          description: List of installation addresses successfully retrieved.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AgileAddressResult'
              example:
                - service_id: "ACC_123456"
                  installation_address:
                    street_type: "Street"
                    street_name: "Tellez"
                    house_number: "12"
                    additional_info: "Door 3C"
                    city: "Riaza"
                    province: "Segovia"
                    country: "es"
                    post_code: "40500"
        '400':
          description: Bad Request. The request is incorrect or missing parameters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: BAD_REQUEST
                title: Bad request
                details: Missing required parameter 'user'
        '401':
          description: Authentication or authorization failure.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: UNAUTHORIZED
                title: Unauthorized
                details: Authorization failed
        '404':
          description: No customer found with the provided identifier.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: RESOURCE_NOT_FOUND
                title: Customer not found
                details: No customer found with the provided user
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: INTERNAL_ERROR
                title: Internal server error
                details: Cannot process the request due to an unexpected error

  /ftth/accesses/info:
    get:
      tags:
        - Provision FTTH
      summary: Get customer data
      description: Get customer data for specified query paramter
      operationId: getFtthAccessesInfo
      parameters:
        - name: phoneNumber
          in: query
          description: Fixed phone number from access to be queried
          required: false
          schema:
            type: string
          example: '900000000'
        - name: gescal37
          in: query
          description: Alphanumeric value of 37 positions, subdivided into subfields that identify each of the geographical entities that comprise it.
          required: false
          schema:
            type: string
          example: '28000000000000005 BA'
        - name: addressId
          in: query
          description: Address id from access to be queried
          required: false
          schema:
            type: string
          example: 'J0000000000000000000000000000001553708'
      responses:
        '200':
          description: Retrieved info
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetFtthAccesesInfoResponse'
        '400':
          description: Invalid body supplied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponseDto'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponseDto'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponseDto'
        '404':
          description: Data not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponseDto'
        '406':
          description: Data not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponseDto'
        '500':
          description: Something was wrong :(
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponseDto'
  /ftth/orange_accesses/info:
    get:
      tags:
        - Provision FTTH
      summary: Get orange access ftth
      description: Get orange access ftth data for specified query parameter
      operationId: getFtthOrangeAccessInfo
      parameters:
        - name: phoneNumber
          in: query
          description: Fixed phone number from access to be queried
          required: false
          schema:
            type: string
          example: '900000000'
        - name: gescal37
          in: query
          description: Alphanumeric value of 37 positions, subdivided into subfields that identify each of the geographical entities that comprise it.
          required: false
          schema:
            type: string
          example: '28000000000000005 BA'
        - name: addressId
          in: query
          description: Address id from access to be queried
          required: false
          schema:
            type: string
          example: 'J0000000000000000000000000000001553708'
      responses:
        '200':
          description: Retrieved info
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FtthOrangeAccessResponse'
        '400':
          description: Invalid body supplied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponseDto'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponseDto'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponseDto'
        '404':
          description: Data not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponseDto'
        '406':
          description: Data not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponseDto'
        '500':
          description: Something was wrong :(
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponseDto'
  /ftth/orange_accesses/retentions:
    post:
      tags:
        - Provision FTTH
      summary: Inform a new retention of a client
      description: The objective is to inform the customer retention option when a fixed access registration is taking place at the opposite brand. The purpose of this service is to inform the opposing brand of the retention option of a new convergent customer and the confirmation or not of the effectiveness of that retention.
      operationId: postFtthOrangeRetentions
      requestBody:
        description: Retentions request
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RetentionsRequest'
      responses:
        '200':
          description: Retrieved info
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RetentionsResponse'
        '400':
          description: Invalid body supplied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponseDto'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponseDto'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponseDto'
        '500':
          description: Something was wrong :(
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponseDto'

  /device-insurance/orgs/{organization}/request:
    post:
      tags:
        - Device Insurance
      summary: Device Insurance new contract
      description: Request a new insurance contract
      operationId: insuranceRequest
      parameters:
        - name: organization
          in: path
          description: Organization name
          required: true
          schema:
            type: string
          example: masmovil
      requestBody:
        description: Device Insurance DTO request
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InsuranceCreationRequestDTO'
      responses:
        '200':
          description: Order created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InsuranceCreationResponseDTO'
        '400':
          description: Invalid body supplied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponseDtoDeviceInsurance'
              example:
                code: EMPTY_BODY
                title: Empty body
                description: null
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponseDtoDeviceInsurance'
              example:
                code: UNAUTHORIZED_REQUEST
                title: Unauthorized request
                description: null
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponseDtoDeviceInsurance'
              example:
                code: FORBIDDEN_RESOURCE
                title: Forbidden resource
                description: null
        '404':
          description: Data not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponseDtoDeviceInsurance'
              example:
                code: NOT_FOUND_WOKRFLOW_TYPE
                title: Not found workflow type
                description: null
        '406':
          description: Not Acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponseDtoDeviceInsurance'
              example:
                code: NOT_ACCEPTABLE
                title: Not acceptable
                description: null
        '500':
          description: Something was wrong :(
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponseDtoDeviceInsurance'
              example:
                code: INTERNAL_SERVER_ERROR
                title: Server is not working due to some error
                description: Something went wrong
  /device-insurance/orgs/{organization}/issue:
    post:
      tags:
        - Device Insurance
      summary: Device Insurance issue a contract
      description: Request a new insurance issue
      operationId: insuranceIssueRequest
      parameters:
        - name: organization
          in: path
          description: Organization name
          required: true
          schema:
            type: string
          example: masmovil
      requestBody:
        description: Device Insurance DTO request
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InsuranceIssueRequestDTO'
      responses:
        '200':
          description: Order created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InsuranceIssueResponseDTO'
        '400':
          description: Invalid body supplied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponseDtoDeviceInsurance'
              example:
                code: EMPTY_BODY
                title: Empty body
                description: null
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponseDtoDeviceInsurance'
              example:
                code: UNAUTHORIZED_REQUEST
                title: Unauthorized request
                description: null
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponseDtoDeviceInsurance'
              example:
                code: FORBIDDEN_RESOURCE
                title: Forbidden resource
                description: null
        '404':
          description: Data not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponseDtoDeviceInsurance'
              example:
                code: NOT_FOUND_WOKRFLOW_TYPE
                title: Not found workflow type
                description: null
        '406':
          description: Not Acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponseDtoDeviceInsurance'
              example:
                code: NOT_ACCEPTABLE
                title: Not acceptable
                description: null
        '500':
          description: Something was wrong :(
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponseDtoDeviceInsurance'
              example:
                code: INTERNAL_SERVER_ERROR
                title: Server is not working due to some error
                description: Something went wrong
  /device-insurance/orgs/{organization}/cancellation:
    post:
      tags:
        - Device Insurance
      summary: Device Insurance cancellation a contract
      description: Request a new insurance cancellation
      operationId: insuranceCancellationRequest
      parameters:
        - name: organization
          in: path
          description: Organization name
          required: true
          schema:
            type: string
          example: masmovil
      requestBody:
        description: Device Insurance DTO request
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InsuranceCancellationRequestDTO'
      responses:
        '200':
          description: Order created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InsuranceCancellationResponseDTO'
        '400':
          description: Invalid body supplied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponseDtoDeviceInsurance'
              example:
                code: EMPTY_BODY
                title: Empty body
                description: null
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponseDtoDeviceInsurance'
              example:
                code: UNAUTHORIZED_REQUEST
                title: Unauthorized request
                description: null
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponseDtoDeviceInsurance'
              example:
                code: FORBIDDEN_RESOURCE
                title: Forbidden resource
                description: null
        '404':
          description: Data not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponseDtoDeviceInsurance'
              example:
                code: NOT_FOUND_WOKRFLOW_TYPE
                title: Not found workflow type
                description: null
        '406':
          description: Not Acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponseDtoDeviceInsurance'
              example:
                code: NOT_ACCEPTABLE
                title: Not acceptable
                description: null
        '500':
          description: Something was wrong :(
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponseDtoDeviceInsurance'
              example:
                code: INTERNAL_SERVER_ERROR
                title: Server is not working due to some error
                description: Something went wrong
  /device-insurance/orgs/{organization}/requestinfo:
    get:
      tags:
        - Device Insurance
      summary: Request info about insurance contract
      description: Request info about insurance contract
      operationId: insuranceInfoRequest
      parameters:
        - name: organization
          in: path
          description: Organization name
          required: true
          schema:
            type: string
          example: masmovil
        - in: query
          schema:
            type: string
          name: document
          description: Document Id
          required: false
        - in: query
          schema:
            type: string
          name: phoneNumber
          description: Phone Number
          required: false
        - in: query
          schema:
            type: string
          name: insuranceNumber
          description: Insurance Number
          required: false
      responses:
        '200':
          description: Order created
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/InsuranceInfoResponseDTO'
        '400':
          description: Invalid body supplied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponseDtoDeviceInsurance'
              example:
                code: EMPTY_BODY
                title: Empty body
                description: null
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponseDtoDeviceInsurance'
              example:
                code: UNAUTHORIZED_REQUEST
                title: Unauthorized request
                description: null
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponseDtoDeviceInsurance'
              example:
                code: FORBIDDEN_RESOURCE
                title: Forbidden resource
                description: null
        '404':
          description: Data not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponseDtoDeviceInsurance'
              example:
                code: NOT_FOUND_WOKRFLOW_TYPE
                title: Not found workflow type
                description: null
        '406':
          description: Not Acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponseDtoDeviceInsurance'
              example:
                code: NOT_ACCEPTABLE
                title: Not acceptable
                description: null
        '500':
          description: Something was wrong :(
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponseDtoDeviceInsurance'
              example:
                code: INTERNAL_SERVER_ERROR
                title: Server is not working due to some error
                description: Something went wrong

  /orgs/{org}/provision/tv/orange/subscriptions/{subscriptionExternalId}:
    post:
      tags:
        - Provision Orange TV
      summary: Activate a subscription
      description: Activate a subscription
      operationId: activateSubscription
      parameters:
        - $ref: '#/components/parameters/Org'
        - $ref: '#/components/parameters/RequestCorrelationId'
        - $ref: '#/components/parameters/SubscriptionExternalId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ActivateSubscription'
        required: true
      responses:
        "201":
          description: Subscription activated successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowResponse'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: MISSING_REQUIRED_PARAMETER
                  title: MISSING_REQUIRED_PARAMETER
                  details: Missing required parameter subscriptionExternalId
        "401":
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: UNAUTHORIZED
                  title: Unauthorized
                  details: Authorization failed
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: INTERNAL_ERROR
                  title: Internal server error
                  details: Cannot process the request due to an unexpected error
    patch:
      tags:
        - Provision Orange TV
      summary: Update a subscription
      description: Update a subscription
      operationId: modifySubscription
      parameters:
        - $ref: '#/components/parameters/Org'
        - $ref: '#/components/parameters/RequestCorrelationId'
        - $ref: '#/components/parameters/SubscriptionExternalId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ModifySubscription'
        required: true
      responses:
        "201":
          description: Subscription modified successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowResponse'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: MISSING_REQUIRED_PARAMETER
                  title: MISSING_REQUIRED_PARAMETER
                  details: Missing required parameter subscriptionExternalId
        "401":
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: UNAUTHORIZED
                  title: Unauthorized
                  details: Authorization failed
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: SERVICE_NOT_FOUND
                  title: SERVICE_NOT_FOUND
                  details: subscriptionExternalId not found
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: INTERNAL_ERROR
                  title: Internal server error
                  details: Cannot process the request due to an unexpected error
    delete:
      tags:
        - Provision Orange TV
      summary: Terminate a subscription
      description: Terminate a subscription
      operationId: terminateSubscription
      parameters:
        - $ref: '#/components/parameters/Org'
        - $ref: '#/components/parameters/RequestCorrelationId'
        - $ref: '#/components/parameters/SubscriptionExternalId'
        - $ref: '#/components/parameters/Experience'
      responses:
        "201":
          description: Subscription terminated successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowResponse'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: MISSING_REQUIRED_PARAMETER
                  title: MISSING_REQUIRED_PARAMETER
                  details: Missing required parameter subscriptionExternalId
        "401":
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: UNAUTHORIZED
                  title: Unauthorized
                  details: Authorization failed
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: SERVICE_NOT_FOUND
                  title: SERVICE_NOT_FOUND
                  details: subscriptionExternalId not found
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: INTERNAL_ERROR
                  title: Internal server error
                  details: Cannot process the request due to an unexpected error
  /orgs/{org}/provision/tv/orange/subscriptions/{subscriptionExternalId}/suspend:
    post:
      tags:
        - Provision Orange TV
      summary: Suspend a subscription
      description: Suspends an active subscription.
      operationId: suspendSubscription
      parameters:
        - $ref: '#/components/parameters/Org'
        - $ref: '#/components/parameters/RequestCorrelationId'
        - $ref: '#/components/parameters/SubscriptionExternalId'
      responses:
        "201":
          description: Subscription suspended successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowResponse'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: MISSING_REQUIRED_PARAMETER
                  title: MISSING_REQUIRED_PARAMETER
                  details: Missing required parameter subscriptionExternalId
        "401":
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: UNAUTHORIZED
                  title: Unauthorized
                  details: Authorization failed
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: SERVICE_NOT_FOUND
                  title: SERVICE_NOT_FOUND
                  details: subscriptionExternalId not found
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: INTERNAL_ERROR
                  title: Internal server error
                  details: Cannot process the request due to an unexpected error
  /orgs/{org}/provision/tv/orange/subscriptions/{subscriptionExternalId}/reactivate:
    post:
      tags:
        - Provision Orange TV
      summary: Reactivate a subscription
      description: Reactivates a previously suspended subscription.
      operationId: reactivateSubscription
      parameters:
        - $ref: '#/components/parameters/Org'
        - $ref: '#/components/parameters/RequestCorrelationId'
        - $ref: '#/components/parameters/SubscriptionExternalId'
      responses:
        "201":
          description: Subscription reactivated successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowResponse'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: MISSING_REQUIRED_PARAMETER
                  title: MISSING_REQUIRED_PARAMETER
                  details: Missing required parameter subscriptionExternalId
        "401":
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: UNAUTHORIZED
                  title: Unauthorized
                  details: Authorization failed
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: SERVICE_NOT_FOUND
                  title: SERVICE_NOT_FOUND
                  details: subscriptionExternalId not found
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: INTERNAL_ERROR
                  title: Internal server error
                  details: Cannot process the request due to an unexpected error
  /orgs/{org}/provision/tv/orange/subscriptions/{subscriptionExternalId}/cancel:
    post:
      tags:
        - Provision Orange TV
      summary: Cancel a subscription in progress
      description: Cancels an in-progress subscription providing the creationWorkflowId.
      operationId: orangeTvCancelSubscription
      parameters:
        - $ref: '#/components/parameters/Org'
        - $ref: '#/components/parameters/RequestCorrelationId'
        - $ref: '#/components/parameters/SubscriptionExternalId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CancelSubscriptionRequest'
      responses:
        "204":
          description: Subscription canceled successfully.
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: MISSING_REQUIRED_PARAMETER
                  title: MISSING_REQUIRED_PARAMETER
                  details: Missing required parameter subscriptionExternalId
        "401":
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: UNAUTHORIZED
                  title: Unauthorized
                  details: Authorization failed
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                title: SERVICE_NOT_FOUND
                details: subscriptionExternalId not found
        "406":
          description: Not Acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: WORKFLOW_NOT_CANCELABLE
                  title: NOT_ACCEPTABLE
                  details: Workflow is not in a cancellable state
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: INTERNAL_ERROR
                  title: Internal server error
                  details: Cannot process the request due to an unexpected error
  /orgs/{org}/provision/tv/orange/customers/{customerExternalId}:
    patch:
      tags:
        - Provision Orange TV
      summary: Modify customer attributes
      description: Modify customer attributes
      operationId: modifyCustomer
      parameters:
        - $ref: '#/components/parameters/Org'
        - $ref: '#/components/parameters/RequestCorrelationId'
        - $ref: '#/components/parameters/CustomerExternalId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ModifyCustomer'
        required: true
      responses:
        "204":
          description: Customer updated successfully.
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: MISSING_REQUIRED_PARAMETER
                  title: MISSING_REQUIRED_PARAMETER
                  details: Missing required parameter customerExternalId

        "401":
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: UNAUTHORIZED
                  title: Unauthorized
                  details: Authorization failed
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: MEMBER_NOT_FOUND
                  title: MEMBER_NOT_FOUND
                  details: customerExternalId not found
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: INTERNAL_ERROR
                  title: Internal server error
                  details: Cannot process the request due to an unexpected error
  /orgs/{org}/provision/tv/orange/customers/{customerExternalId}/devices:
    get:
      tags:
        - Provision Orange TV
      summary: Get devices
      description: Get devices
      operationId: getDevices
      parameters:
        - $ref: '#/components/parameters/Org'
        - $ref: '#/components/parameters/RequestCorrelationId'
        - $ref: '#/components/parameters/CustomerExternalId'
        - $ref: '#/components/parameters/Experience'
      responses:
        "200":
          description: Get devices request successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetDevicesResponse'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: MISSING_REQUIRED_PARAMETER
                  title: MISSING_REQUIRED_PARAMETER
                  details: Missing required parameter customerExternalId

        "401":
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: UNAUTHORIZED
                  title: Unauthorized
                  details: Authorization failed
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: MEMBER_NOT_FOUND
                  title: MEMBER_NOT_FOUND
                  details: customerExternalId not found
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: INTERNAL_ERROR
                  title: Internal server error
                  details: Cannot process the request due to an unexpected error
  /orgs/{org}/provision/tv/orange/customers/{customerExternalId}/devices/{serialNumber}:
    delete:
      tags:
        - Provision Orange TV
      summary: Delete a device
      description: Delete a device
      operationId: deleteDevice
      parameters:
        - $ref: '#/components/parameters/Org'
        - $ref: '#/components/parameters/RequestCorrelationId'
        - $ref: '#/components/parameters/CustomerExternalId'
        - $ref: '#/components/parameters/SerialNumber'
        - $ref: '#/components/parameters/Experience'
      responses:
        "204":
          description: Device deleted successfully.
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: MISSING_REQUIRED_PARAMETER
                  title: MISSING_REQUIRED_PARAMETER
                  details: Missing required parameter customerExternalId

        "401":
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: UNAUTHORIZED
                  title: Unauthorized
                  details: Authorization failed
        "404":
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: TERMINAL_NOT_FOUND
                  title: TERMINAL_NOT_FOUND
                  details: No terminal found with the given SerialNumber
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors'
              example:
                - code: INTERNAL_ERROR
                  title: Internal server error
                  details: Cannot process the request due to an unexpected error

  /orgs/{org_id}/tesamanager/activation:
    post:
      tags:
        - Tesamanager
      summary: Create new activation to TESA
      description: Create new activation to TESA
      operationId: createActivation
      parameters:
        - $ref: '#/components/parameters/OrgId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TesaActivationRequest'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Created
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Bad request
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Unauthorized
        default:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Something was wrong :(
  /orgs/{org_id}/tesamanager/termination:
    post:
      tags:
        - Tesamanager
      summary: Create new termination to TESA
      description: Create new termination to TESA
      operationId: createTermination
      parameters:
        - $ref: '#/components/parameters/OrgId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TesaTerminationRequest'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Created
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Bad request
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Unauthorized
        default:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Something was wrong :(
  /orgs/{org_id}/tesamanager/modification:
    post:
      tags:
        - Tesamanager
      summary: Create new modification to TESA
      description: Create new modification to TESA
      operationId: createModification
      parameters:
        - $ref: '#/components/parameters/OrgId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TesaModificationRequest'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Created
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Bad request
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Unauthorized
        default:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Something was wrong :(
  /orgs/{org_id}/tesamanager/cancellation:
    put:
      tags:
        - Tesamanager
      summary: Cancel a TESA request
      description: Cancel a TESA request
      operationId: createCancellation
      parameters:
        - $ref: '#/components/parameters/OrgId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TesaCancellationRequest'
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Created
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Bad request
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Unauthorized
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Not found
        '406':
          description: Not acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Not acceptable
        default:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Something was wrong :(
  /orgs/{org_id}/tesamanager/incident/resolved:
    put:
      tags:
        - Tesamanager
      summary: Resolve a TESA incident
      description: Resolve a TESA incident
      operationId: incidentResolved
      parameters:
        - $ref: '#/components/parameters/OrgId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TesaIncidentResolveRequest'
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Created
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Bad request
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Unauthorized
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Not found
        '406':
          description: Not acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Not acceptable
        default:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Something was wrong :(
  /orgs/{org_id}/tesamanager/stamping/access:
    post:
      tags:
        - Tesamanager
      summary: Create access to TESA for stamping
      description: Create access to TESA for stamping
      operationId: stampingAccess
      parameters:
        - $ref: '#/components/parameters/OrgId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TesaCreateAccessRequest'
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Bad request
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Unauthorized
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Not found
        '406':
          description: Not acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Not acceptable
        default:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Something was wrong :(
  /orgs/{org_id}/tesamanager/stamping/cto_status:
    post:
      tags:
        - Tesamanager
      summary: Create request CTO status to TESA for stamping
      description: Create request CTO status to TESA for stamping
      operationId: stampingCtoStatus
      parameters:
        - $ref: '#/components/parameters/OrgId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TesaCreateStatusCtoRequest'
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Bad request
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Unauthorized
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Not found
        '406':
          description: Not acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Not acceptable
        default:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Something was wrong :(
  /orgs/{org_id}/tesamanager/stamping/port_test:
    post:
      tags:
        - Tesamanager
      summary: Create request port test to TESA for stamping
      description: Create request port test to TESA for stamping
      operationId: stampingPortTest
      parameters:
        - $ref: '#/components/parameters/OrgId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TesaCreatePortRequest'
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Bad request
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Unauthorized
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Not found
        '406':
          description: Not acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Not acceptable
        default:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Something was wrong :(
  /orgs/{org_id}/tesamanager/stamping/service_recovery:
    post:
      tags:
        - Tesamanager
      summary: Create request service recovery to TESA for stamping
      description: Create request service recovery to TESA for stamping
      operationId: stampingServiceRecovery
      parameters:
        - $ref: '#/components/parameters/OrgId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TesaCreatePortRequest'
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Bad request
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Unauthorized
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Not found
        '406':
          description: Not acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Not acceptable
        default:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Something was wrong :(
  /orgs/{org_id}/tesamanager/stamping/termination:
    post:
      tags:
        - Tesamanager
      summary: Create end stamping to TESA
      description: Create end stamping to TESA
      operationId: stampingTermination
      parameters:
        - $ref: '#/components/parameters/OrgId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TesaTerminateAccessRequest'
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Bad request
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Unauthorized
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Not found
        '406':
          description: Not acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Not acceptable
        default:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Something was wrong :(
  /orgs/{org_id}/tesamanager/installation/incident:
    post:
      tags:
        - Tesamanager
      summary: Create installation incident to TESA
      description: Create installation incident to TESA
      operationId: installationIncident
      parameters:
        - $ref: '#/components/parameters/OrgId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TesaInstallationIncidentRequest'
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Bad request
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Unauthorized
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Not found
        '406':
          description: Not acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Not acceptable
        default:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Something was wrong :(
  /orgs/{org_id}/tesamanager/installation/end:
    post:
      tags:
        - Tesamanager
      summary: Create installation end to TESA
      description: Create installation end to TESA
      operationId: installationEnd
      parameters:
        - $ref: '#/components/parameters/OrgId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TesaInstallationEndRequest'
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Bad request
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Unauthorized
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Not found
        '406':
          description: Not acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Not acceptable
        default:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Something was wrong :(
  /orgs/{org_id}/tesamanager/installation/cto_change:
    post:
      tags:
        - Tesamanager
      summary: Create installation CTO change request to TESA
      description: Create installation CTO change request to TESA
      operationId: installationCtoChange
      parameters:
        - $ref: '#/components/parameters/OrgId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TesaCtoChangeRequest'
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Bad request
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Unauthorized
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Not found
        '406':
          description: Not acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Not acceptable
        default:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Something was wrong :(
  /orgs/{org_id}/tesamanager/maintenance/cto_change:
    post:
      tags:
        - Tesamanager
      summary: Create CTO change request to TESA
      description: Create CTO change request to TESA
      operationId: maintenanceCtoChange
      parameters:
        - $ref: '#/components/parameters/OrgId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TesaMaintenanceCtoChangeRequest'
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Bad request
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Unauthorized
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Not found
        '406':
          description: Not acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Not acceptable
        default:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Something was wrong :(
  /orgs/{org_id}/tesamanager/fault:
    post:
      tags:
        - Tesamanager
      summary: Create fault request to TESA
      description: Create fault request to TESA
      operationId: createFault
      parameters:
        - $ref: '#/components/parameters/OrgId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TesaCreateFaultRequest'
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Bad request
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Unauthorized
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Not found
        '406':
          description: Not acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Not acceptable
        default:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Something was wrong :(
    put:
      tags:
        - Tesamanager
      summary: Modify fault request to TESA
      description: Modify fault request to TESA
      operationId: modifyFault
      parameters:
        - $ref: '#/components/parameters/OrgId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TesaModifyFaultRequest'
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Bad request
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Unauthorized
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Not found
        '406':
          description: Not acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Not acceptable
        default:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Something was wrong :(
  /orgs/{org_id}/tesamanager/fault/close:
    post:
      tags:
        - Tesamanager
      summary: Close fault request to TESA
      description: Close fault request to TESA
      operationId: closeFault
      parameters:
        - $ref: '#/components/parameters/OrgId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TesaCloseFaultRequest'
      responses:
        "200":
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Bad request
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Unauthorized
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Not found
        '406':
          description: Not acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Not acceptable
        default:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Something was wrong :(
  /orgs/{org_id}/tesamanager/fault/attach:
    post:
      tags:
        - Tesamanager
      summary: Attach file to fault
      description: Attach a file to an existing fault in TESA
      operationId: attachFaultFile
      parameters:
        - $ref: '#/components/parameters/OrgId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TesaAttachFaultFileRequest'
      responses:
        "200":
          description: File attached successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Bad request
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Unauthorized
        "404":
          description: Fault not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Not found
        default:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Something was wrong :(
  /orgs/{org_id}/tesamanager/fault/retry:
    post:
      tags:
        - Tesamanager
      summary: Retry fault request to TESA
      description: Retry a fault request to TESA
      operationId: retryFault
      parameters:
        - $ref: '#/components/parameters/OrgId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TesaRetryFaultRequest'
      responses:
        "200":
          description: Fault retried successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Bad request
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Unauthorized
        "404":
          description: Fault not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Not found
        default:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Something was wrong :(
  /orgs/{org_id}/tesamanager/fault/reopen:
    post:
      tags:
        - Tesamanager
      summary: Reopen fault request to TESA
      description: Reopen a fault request to TESA
      operationId: reopenFault
      parameters:
        - $ref: '#/components/parameters/OrgId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TesaReopenFaultRequest'
      responses:
        "200":
          description: Fault reopened successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Bad request
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Unauthorized
        "404":
          description: Fault not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Not found
        default:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Something was wrong :(
  /orgs/{org_id}/tesamanager/tesa_requests:
    get:
      tags:
        - Tesamanager
      summary: Tesa requests reference ids collection
      operationId: getReferenceIds
      parameters:
        - $ref: '#/components/parameters/OrgId'
        - description: Get reference ids of requests with a status.  Admits more than one status separated by ','
          in: query
          name: statuses
          required: false
          explode: false
          schema:
            type: array
            items:
              $ref: '#/components/schemas/TesaStatus'
        - description: Get reference ids of requests with an external reference
          explode: false
          in: query
          name: externalReference
          required: false
          schema:
            example: EXT_REF
            type: string
          style: form
        - description: Get reference ids of requests which are of auto-installation
          explode: false
          in: query
          name: autoInstallation
          required: false
          schema:
            type: boolean
          style: form
        - description: Get reference ids of cancelling requests
          explode: false
          in: query
          name: cancelling
          required: false
          schema:
            type: boolean
          style: form
        - $ref: '#/components/parameters/TesaPersistenceTypeParameter'
        - description: Get reference ids of requests not updated since
          explode: false
          in: query
          name: notUpdatedSince
          required: false
          schema:
            example: 2023-05-31T08:50:40Z
            format: date-time
            type: string
          style: form
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaReferenceIdList'
          description: The ids have been successfully retrieved
        "401":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaError'
          description: Unauthorized
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaError'
          description: Unexpected error
  /orgs/{org_id}/tesamanager/request/{reference_id}:
    get:
      tags:
        - Tesamanager
      operationId: getTesaRequestById
      summary: Info for a specific Tesa request
      x-accepts: application/json
      parameters:
        - $ref: '#/components/parameters/OrgId'
        - $ref: '#/components/parameters/TesaReferenceId'
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaRequest'
          description: The Tesa request has been successfully retrieved
        "401":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaError'
          description: Unauthorized
        "404":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaError'
          description: Not Found
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaError'
          description: Unexpected error
  /orgs/{org_id}/tesamanager/request/{reference_id}/events:
    get:
      summary: List with tesa request events
      tags:
        - Tesamanager
      x-accepts: application/json
      operationId: getEventByReferenceId
      parameters:
        - $ref: '#/components/parameters/OrgId'
        - $ref: '#/components/parameters/TesaReferenceId'
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/TesaEvent'
                type: array
          description: The request events have been successfully retrieved
        "401":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaError'
          description: Unauthorized
        "404":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaError'
          description: Not Found
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaError'
          description: Unexpected error
  /orgs/{org_id}/tesamanager/request/{reference_id}/connection_events:
    get:
      summary: List with tesa request connection events
      tags:
        - Tesamanager
      x-accepts: application/json
      operationId: getConnectionEventByReferenceId
      parameters:
        - $ref: '#/components/parameters/OrgId'
        - $ref: '#/components/parameters/TesaReferenceId'
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/TesaConnectionEvent'
                type: array
          description: The request events have been successfully retrieved
        "401":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaError'
          description: Unauthorized
        "404":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaError'
          description: Not Found
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaError'
          description: Unexpected error
  /orgs/{org_id}/tesamanager/request/{reference_id}/issues:
    get:
      summary: List with tesa request issues
      tags:
        - Tesamanager
      x-accepts: application/json
      operationId: getIssuesByReferenceId
      parameters:
        - $ref: '#/components/parameters/OrgId'
        - $ref: '#/components/parameters/TesaReferenceId'
      responses:
        "200":
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/TesaIssue'
                type: array
          description: The request issues have been successfully retrieved
        "401":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaError'
          description: Unauthorized
        "404":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaError'
          description: Not Found
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaError'
          description: Unexpected error
  /orgs/{org_id}/tesamanager/fault/{fault_number}:
    get:
      tags:
        - Tesamanager
      summary: Get fault details by fault number
      description: Retrieve fault information by fault number returned by TESA
      operationId: getFaultByFaultNumber
      parameters:
        - $ref: '#/components/parameters/OrgId'
        - name: fault_number
          in: path
          required: true
          description: The fault number to retrieve
          schema:
            type: string
      responses:
        "200":
          description: The fault has been successfully retrieved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaFaultResponse'
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Unauthorized
        "404":
          description: Fault not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Not found
        default:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Something was wrong :(
  /orgs/{org_id}/tesamanager/fault/externalReference/{external_reference}:
    get:
      tags:
        - Tesamanager
      summary: Get faults by external reference
      description: Retrieve all faults associated with a specific external reference
      operationId: getFaultsByExternalReference
      parameters:
        - $ref: '#/components/parameters/OrgId'
        - name: external_reference
          in: path
          required: true
          description: The external reference to search for
          schema:
            type: string
      responses:
        "200":
          description: The faults have been successfully retrieved
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TesaFaultResponse'
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Unauthorized
        "404":
          description: Faults not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Not found
        default:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TesaResult'
              example:
                message: Something was wrong :(
  /orgs/{org_id}/mobile/activate:
    post:
      tags:
        - Mobile
      summary: Request mobile activation
      description: Request mobile activation
      operationId: mobileActivate
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MobileActivateRequest'
        required: true
      parameters:
        - in: header
          name: Request-Correlation-Id
          description: Unique request identifier
          schema:
            type: string
            format: uuid
            example: 01968069-ad7b-7cef-8cd0-7dddaecbf813
          required: true
        - name: org_id
          in: path
          description: Organization name
          required: true
          schema:
            type: string
          example: masmovil
      responses:
        '200':
          description: The operation request was successfully accepted, returned the request external reference identifier
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileProcessResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileErrorResponse'
              example:
                code: BAD_REQUEST
                title: MISSING CALLBACK URL
        '401':
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileErrorResponse'
              example:
                code: UNAUTHORIZED_REQUEST
                title: Missing credentials
        '403':
          description: Forbidden resource
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileErrorResponse'
              example:
                code: FORBIDDEN_RESOURCE
                title: Request forbidden by administrative rules
        '404':
          description: Data not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileErrorResponse'
        '406':
          description: Not Acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileErrorResponse'
              example:
                code: DUPLICATE_PROCESS_ID
                title: Duplicate process id
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileErrorResponse'
              example:
                code: INTERNAL_SERVER_ERROR
                title: Server is not working due to some error

  /orgs/{org_id}/mobile/activate/{process_id}/cancel:
    put:
      tags:
        - Mobile
      summary: Cancel mobile activation
      description: Cancel mobile activation
      operationId: mobileCancelActivation
      parameters:
        - in: header
          name: Request-Correlation-Id
          description: Unique request identifier
          schema:
            type: string
            format: uuid
          required: true
          example: 01968069-ad7b-7cef-8cd0-7dddaecbf813
        - name: org_id
          in: path
          description: Organization name
          required: true
          schema:
            type: string
          example: masmovil
        - name: process_id
          in: path
          description: Process id of the activation to be cancelled
          required: true
          schema:
            type: string
          example: 'process-01'
      responses:
        '200':
          description: The operation request was successfully accepted, returned the request external reference identifier
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileSuccessResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileErrorResponse'
              example:
                code: BAD_REQUEST
                title: MISSING CALLBACK URL
        '401':
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileErrorResponse'
              example:
                code: UNAUTHORIZED_REQUEST
                title: Missing credentials
        '403':
          description: Forbidden resource
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileErrorResponse'
              example:
                code: FORBIDDEN_RESOURCE
                title: Request forbidden by administrative rules
        '404':
          description: Data not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileErrorResponse'
        '406':
          description: Not Acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileErrorResponse'
              example:
                code: DUPLICATE_PROCESS_ID
                title: Duplicate process id
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileErrorResponse'
              example:
                code: INTERNAL_SERVER_ERROR
                title: Server is not working due to some error

  /orgs/{org_id}/mobile/terminate:
    post:
      tags:
        - Mobile
      summary: Request mobile termination
      description: Request mobile termination
      operationId: mobileTerminate
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MobileTerminateRequest'
      parameters:
        - in: header
          name: Request-Correlation-Id
          description: Unique request identifier
          schema:
            type: string
            format: uuid
          required: true
          example: 01968069-ad7b-7cef-8cd0-7dddaecbf813
        - name: org_id
          in: path
          description: Organization name
          required: true
          schema:
            type: string
          example: masmovil
      responses:
        '200':
          description: The operation request was successfully accepted, returned the request external reference identifier
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileProcessResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileErrorResponse'
              example:
                code: BAD_REQUEST
                title: MISSING CALLBACK URL
        '401':
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileErrorResponse'
              example:
                code: UNAUTHORIZED_REQUEST
                title: Missing credentials
        '403':
          description: Forbidden resource
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileErrorResponse'
              example:
                code: FORBIDDEN_RESOURCE
                title: Request forbidden by administrative rules
        '404':
          description: Data not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileErrorResponse'
        '406':
          description: Not Acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileErrorResponse'
              example:
                code: DUPLICATE_PROCESS_ID
                title: Duplicate process id
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileErrorResponse'
              example:
                code: INTERNAL_SERVER_ERROR
                title: Server is not working due to some error

  /orgs/{org_id}/mobile/{msisdn}/tariff:
    put:
      tags:
        - Mobile
      summary: Request mobile change tariff
      description: Request mobile change tariff
      operationId: mobileChangeTariff
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MobileChangeTariffRequest'
        required: true
      parameters:
        - in: header
          name: Request-Correlation-Id
          description: Unique request identifier
          schema:
            type: string
            format: uuid
          required: true
          example: 01968069-ad7b-7cef-8cd0-7dddaecbf813
        - name: org_id
          in: path
          description: Organization name
          required: true
          schema:
            type: string
          example: masmovil
        - name: msisdn
          in: path
          description: Msisdn
          required: true
          schema:
            type: string
            pattern: "^\\d{4,14}$"
          example: '675588933'
      responses:
        '200':
          description: The operation request was successfully accepted, returned the request external reference identifier
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileProcessResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileErrorResponse'
              example:
                code: BAD_REQUEST
                title: MISSING CALLBACK URL
        '401':
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileErrorResponse'
              example:
                code: UNAUTHORIZED_REQUEST
                title: Missing credentials
        '403':
          description: Forbidden resource
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileErrorResponse'
              example:
                code: FORBIDDEN_RESOURCE
                title: Request forbidden by administrative rules
        '404':
          description: Data not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileErrorResponse'
        '406':
          description: Not Acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileErrorResponse'
              example:
                code: DUPLICATE_PROCESS_ID
                title: Duplicate process id
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileErrorResponse'
              example:
                code: INTERNAL_SERVER_ERROR
                title: Server is not working due to some error

  /orgs/{org_id}/mobile/{msisdn}/sim:
    put:
      tags:
        - Mobile
      summary: Request mobile change sim
      description: Request mobile change sim
      operationId: mobileChangeSim
      parameters:
        - in: header
          name: Request-Correlation-Id
          description: Unique request identifier
          schema:
            type: string
            format: uuid
          required: true
          example: 01968069-ad7b-7cef-8cd0-7dddaecbf813
        - name: org_id
          in: path
          description: Organization name
          required: true
          schema:
            type: string
          example: masmovil
        - name: msisdn
          in: path
          description: Msisdn
          required: true
          schema:
            type: string
            pattern: "^\\d{4,14}$"
          example: '675588933'
      requestBody:
        description: Contains an request to change sim card.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MobileChangeSimRequest'
        required: true
      responses:
        '200':
          description: Process created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileProcessResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileErrorResponse'
              example:
                code: BAD_REQUEST
                title: MISSING CALLBACK URL
        '401':
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileErrorResponse'
              example:
                code: UNAUTHORIZED_REQUEST
                title: Missing credentials
        '403':
          description: Forbidden resource
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileErrorResponse'
              example:
                code: FORBIDDEN_RESOURCE
                title: Request forbidden by administrative rules
        '404':
          description: Data not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileErrorResponse'
        '406':
          description: Not Acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileErrorResponse'
              example:
                code: DUPLICATE_PROCESS_ID
                title: Duplicate process id
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileErrorResponse'
              example:
                code: INTERNAL_SERVER_ERROR
                title: Server is not working due to some error

  /orgs/{org_id}/mobile/{msisdn}/multi_sim:
    put:
      tags:
        - Mobile
      summary: Request mobile change multi-sim
      description: Request mobile change multi-sim
      operationId: mobileChangeMultiSim
      parameters:
        - in: header
          name: Request-Correlation-Id
          description: Unique request identifier
          schema:
            type: string
            format: uuid
          required: true
          example: 01968069-ad7b-7cef-8cd0-7dddaecbf813
        - name: org_id
          in: path
          description: Organization name
          required: true
          schema:
            type: string
          example: masmovil
        - name: msisdn
          in: path
          description: Msisdn
          required: true
          schema:
            type: string
            pattern: "^\\d{4,14}$"
          example: '675588933'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MobileChangeMultiSimRequest'
        required: true
      responses:
        '200':
          description: Process created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileProcessResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileErrorResponse'
              example:
                code: BAD_REQUEST
                title: MISSING CALLBACK URL
        '401':
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileErrorResponse'
              example:
                code: UNAUTHORIZED_REQUEST
                title: Missing credentials
        '403':
          description: Forbidden resource
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileErrorResponse'
              example:
                code: FORBIDDEN_RESOURCE
                title: Request forbidden by administrative rules
        '404':
          description: Data not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileErrorResponse'
        '406':
          description: Not Acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileErrorResponse'
              example:
                code: DUPLICATE_PROCESS_ID
                title: Duplicate process id
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileErrorResponse'
              example:
                code: INTERNAL_SERVER_ERROR
                title: Server is not working due to some error

  /orgs/{org_id}/mobile/{msisdn}/call/waiting:
    put:
      tags:
        - Mobile
      summary: Request mobile change call waiting
      description: Request mobile change call waiting
      operationId: mobileChangeCallWaiting
      parameters:
        - in: header
          name: Request-Correlation-Id
          description: Unique request identifier
          schema:
            type: string
            format: uuid
          required: true
          example: 01968069-ad7b-7cef-8cd0-7dddaecbf813
        - name: org_id
          in: path
          description: Organization name
          required: true
          schema:
            type: string
          example: masmovil
        - name: msisdn
          in: path
          description: Msisdn
          required: true
          schema:
            type: string
            pattern: "^\\d{4,14}$"
          example: '675588933'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MobileChangeCallWaitingRequest'
        required: true
      responses:
        '200':
          description: Process created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileProcessResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileErrorResponse'
              example:
                code: BAD_REQUEST
                title: MISSING CALLBACK URL
        '401':
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileErrorResponse'
              example:
                code: UNAUTHORIZED_REQUEST
                title: Missing credentials
        '403':
          description: Forbidden resource
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileErrorResponse'
              example:
                code: FORBIDDEN_RESOURCE
                title: Request forbidden by administrative rules
        '404':
          description: Data not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileErrorResponse'
        '406':
          description: Not Acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileErrorResponse'
              example:
                code: DUPLICATE_PROCESS_ID
                title: Duplicate process id
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileErrorResponse'
              example:
                code: INTERNAL_SERVER_ERROR
                title: Server is not working due to some error

  /orgs/{org_id}/mobile/{msisdn}/call/forward:
    put:
      tags:
        - Mobile
      summary: Request mobile change call forward
      description: Request mobile change call forward
      operationId: mobileChangeCallForward
      parameters:
        - in: header
          name: Request-Correlation-Id
          description: Unique request identifier
          schema:
            type: string
            format: uuid
          required: true
          example: 01968069-ad7b-7cef-8cd0-7dddaecbf813
        - name: org_id
          in: path
          description: Organization name
          required: true
          schema:
            type: string
          example: masmovil
        - name: msisdn
          in: path
          description: Msisdn
          required: true
          schema:
            type: string
            pattern: "^\\d{4,14}$"
          example: '675588933'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MobileChangeCallForwardingRequest'
        required: true
      responses:
        '200':
          description: Process created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileProcessResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileErrorResponse'
              example:
                code: BAD_REQUEST
                title: MISSING CALLBACK URL
        '401':
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileErrorResponse'
              example:
                code: UNAUTHORIZED_REQUEST
                title: Missing credentials
        '403':
          description: Forbidden resource
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileErrorResponse'
              example:
                code: FORBIDDEN_RESOURCE
                title: Request forbidden by administrative rules
        '404':
          description: Data not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileErrorResponse'
        '406':
          description: Not Acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileErrorResponse'
              example:
                code: DUPLICATE_PROCESS_ID
                title: Duplicate process id
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileErrorResponse'
              example:
                code: INTERNAL_SERVER_ERROR
                title: Server is not working due to some error

  /orgs/{org_id}/mobile/{msisdn}/barrings:
    put:
      tags:
        - Mobile
      summary: Request mobile change barrings
      description: Request mobile change barrings
      operationId: mobileChangeBarrings
      parameters:
        - in: header
          name: Request-Correlation-Id
          schema:
            type: string
            format: uuid
          required: true
        - name: org_id
          in: path
          description: Organization name
          required: true
          schema:
            type: string
          example: masmovil
        - name: msisdn
          in: path
          description: msisdn
          required: true
          schema:
            type: string
            pattern: "^\\d{4,14}$"
          example: 6998566
      requestBody:
        description: Contains an request to change sim card.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MobileChangeBarringsRequest'
        required: true
      responses:
        "200":
          description: Order created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileProcessResponse'
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileErrorResponse'
              example:
                code: BAD_REQUEST
                title: MISSING CALLBACK URL
        "401":
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileErrorResponse'
              example:
                code: UNAUTHORIZED_REQUEST
                title: Missing credentials
        "403":
          description: Forbidden resource
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileErrorResponse'
              example:
                code: FORBIDDEN_RESOURCE
                title: Request forbidden by administrative rules
        '404':
          description: Data not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileErrorResponse'
        "406":
          description: Not Acceptable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileErrorResponse'
              example:
                code: DUPLICATE_WORKFLOW_ID
                title: Duplicate workflow id
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobileErrorResponse'
              example:
                code: INTERNAL_SERVER_ERROR
                title: Server is not working due to some error

components:
  headers:
    X-B3-TraceId:
      description: Unique identifier generated for each request.
      schema:
        type: string
  schemas:
    Errors:
      type: array
      items:
        $ref: '#/components/schemas/Error'
    Error:
      type: object
      properties:
        code:
          type: string
          example: SomeErrorCode
        title:
          type: string
          example: TITLE_OF_THE_DOMAIN_ERROR
        ref:
          type: string
          example: https://developers.masstack.com/en/docs/apis_provision_doc_swagger/1/apioverview/#errors
        details:
          type: string
          example: Some error happened

    AmazonCancelSubscription:
      required:
        - external_id
        - reason
      properties:
        external_id:
          $ref: '#/components/schemas/AmazonExternalID'
        reason:
          $ref: '#/components/schemas/AmazonCancelReason'
    AmazonCreateSubscription:
      required:
        - billing_id
        - external_id
        - offer_code
        - product
      properties:
        billing_id:
          $ref: '#/components/schemas/AmazonBillingID'
        email:
          $ref: '#/components/schemas/AmazonEmail'
        external_id:
          $ref: '#/components/schemas/AmazonExternalID'
        msisdn:
          $ref: '#/components/schemas/AmazonMSISDN'
        offer_code:
          $ref: '#/components/schemas/AmazonOfferCode'
        product:
          $ref: '#/components/schemas/AmazonProductID'
    AmazonGenerateActivationUrl:
      required:
        - external_id
      properties:
        external_id:
          $ref: '#/components/schemas/AmazonExternalID'
        validity_duration_minutes:
          $ref: '#/components/schemas/AmazonActivationURLValidityDuration'
    AmazonGenerateAccountRecoveryUrl:
      required:
        - external_id
      properties:
        external_id:
          $ref: '#/components/schemas/AmazonExternalID'
    AmazonGenerateActivationURLResponse:
      properties:
        expiry_date:
          $ref: '#/components/schemas/AmazonActivationURLExpiryDate'
        url:
          $ref: '#/components/schemas/AmazonActivationURL'
    AmazonGetBundleDetailsResponse:
      properties:
        id:
          $ref: '#/components/schemas/AmazonBundleID'
        state:
          $ref: '#/components/schemas/AmazonBundleState'
        product:
          $ref: '#/components/schemas/AmazonProductID'
        subscription_id:
          $ref: '#/components/schemas/AmazonSubscriptionID'
        starts_at:
          $ref: '#/components/schemas/AmazonBundleStartsAt'
    AmazonGetSubscriptionDetailsResponse:
      properties:
        subscription_id:
          $ref: '#/components/schemas/AmazonSubscriptionID'
        subscription_state:
          $ref: '#/components/schemas/AmazonSubscriptionState'
        subscription_created_at:
          $ref: '#/components/schemas/AmazonSubscriptionCreatedAt'
        offer_code:
          $ref: '#/components/schemas/AmazonOfferCode'
        product:
          $ref: '#/components/schemas/AmazonProductID'
        merchant_reference:
          $ref: '#/components/schemas/AmazonMerchantReference'
        billing_identity:
          $ref: '#/components/schemas/AmazonBillingID'
        termination_reason:
          $ref: '#/components/schemas/AmazonCancelReason'
        bundle_state:
          $ref: '#/components/schemas/AmazonBundleState'
    AmazonResumeSubscription:
      required:
        - external_id
      properties:
        external_id:
          $ref: '#/components/schemas/AmazonExternalID'
    AmazonSuspendSubscription:
      required:
        - external_id
      properties:
        external_id:
          $ref: '#/components/schemas/AmazonExternalID'
    AmazonUpdateSubscription:
      required:
        - external_id
        - product
      properties:
        external_id:
          $ref: '#/components/schemas/AmazonExternalID'
        product:
          $ref: '#/components/schemas/AmazonProductID'
    AmazonActivationURL:
      description: Activation URL.
      type: string
      example: https://www.example.com/activation/123
    AmazonActivationURLValidityDuration:
      description: Specifies the validity duration of the activation URL in minutes. If provided, the activation URL will be valid for the specified duration. If not provided, a default validity duration will be used. Value must be between 15 and 60 minutes.
      type: integer
      format: int32
      example: 30
    AmazonBillingID:
      description: Unique subscriber identifier.
      type: string
      example: AAZ875147628
    AmazonBundleID:
      description: Unique activated bundle id that is used in all subsequent operations.
      type: string
      example: 9182ee-e139-4629-419909-024356f929c3
    AmazonBundleStartsAt:
      description: ISO 8601 formatted bundle validity start.
      type: string
      example: 2016-08-22T09:25:54.394Z
    AmazonBundleState:
      description: >
        State of the already active entitlement (bundle).

        - ACTIVATED: Bundle was successfully validated and activated

        - CANCELLED: Bundle was cancelled either by user or mobile operator

        - FAILED: Bundle activation failed

        - SUSPENDED: Bundle was suspended
      type: string
      x-extensible-enum:
        - ACTIVATED
        - CANCELLED
        - FAILED
        - SUSPENDED
      example: ACTIVATED
    AmazonCancelReason:
      description: >
        Indicates the reason for cancellation.

        - BILLING_FAILED_RENEWAL: Customer did not meet financial obligations in time for the billing cycle.

        - CUSTOMER_ACCOUNT_CHANGE: Customer has changed their account the offer is attached to.

        - CUSTOMER_CLOSED_ACCOUNT: Customer closed their account with the mobile operator.

        - CUSTOMER_INELIGIBLE: Customer was found to be ineligible for the offer.

        - CUSTOMER_OPT_OUT: Customer cancelled the subscription.

        - CUSTOMER_PLAN_CHANGE: Customer changed their rate plan and is no longer eligible for their subscription.

        - MERCHANT_OPT_OUT: Cancellation originated by partner, which does not map to any of the other reasons.

        - RESELLER_OPT_OUT: Cancellation originated by telco, which does not map to any of the other reasons.

        - SUSPECTED_FRAUD: Suspected fraud.

        - TEST_BUNDLE: Bundle was created for pre-launch testing, but has become stuck in an invalid state, or no longer desired, after launch.
      type: string
      x-extensible-enum:
        - BILLING_FAILED_RENEWAL
        - CUSTOMER_ACCOUNT_CHANGE
        - CUSTOMER_CLOSED_ACCOUNT
        - CUSTOMER_INELIGIBLE
        - CUSTOMER_OPT_OUT
        - CUSTOMER_PLAN_CHANGE
        - MERCHANT_OPT_OUT
        - RESELLER_OPT_OUT
        - SUSPECTED_FRAUD
        - TEST_BUNDLE
      example: CUSTOMER_OPT_OUT
    AmazonEmail:
      description: The primary email address preferred by the customer.
      type: string
      example: test@email.com
    AmazonActivationURLExpiryDate:
      description: Date when activation URL expires in ISO 8601 format.
      type: string
      example: 2023-06-20T14:32:45+02:00
    AmazonExternalID:
      description: Identifier to associate an account in your system with an Amazon account.
      type: string
      example: userid_8572394923
    AmazonMSISDN:
      description: MSISDN
      type: string
      example: "+525512345678"
    AmazonMerchantReference:
      description: Merchant reference identifier.
      type: string
      example: "merchant-ref-12345"
    AmazonOfferCode:
      description: Offer identifier provided by Amazon.
      type: string
      example: boku-web-demo
    AmazonProductID:
      description: Amazon product identifier.
      type: string
      example: PV_3M_PROMO
    AmazonSubscriptionID:
      description: Subscription identifier.
      type: string
      example: 1982io-e112-9002-123029-tr4006f919aa
    AmazonSubscriptionCreatedAt:
      description: ISO 8601 formatted bundle validity start.
      type: string
      example: 2016-08-22T09:25:54.394Z
    AmazonSubscriptionState:
      description: State of the subscription
      type: string
      example: CANCELLED

    NetflixCreateSubscription:
      required:
        - billing_event_id
        - bundle_id
        - channel
        - netflix_offer_id
        - partner_account_id
        - partner_charge_country
      properties:
        billing_event_id:
          $ref: '#/components/schemas/NetflixBillingEventID'
        bundle_id:
          $ref: '#/components/schemas/NetflixBundleID'
        channel:
          $ref: '#/components/schemas/NetflixChannel'
        netflix_email:
          $ref: '#/components/schemas/NetflixEmail'
        netflix_offer_id:
          $ref: '#/components/schemas/NetflixOfferID'
        netflix_phone:
          $ref: '#/components/schemas/NetflixPhone'
        partner_account_id:
          $ref: '#/components/schemas/NetflixPartnerAccountId'
        partner_charge_country:
          $ref: '#/components/schemas/NetflixPartnerChargeCountry'
        preferred_language:
          $ref: '#/components/schemas/NetflixPreferredLanguage'
    NetflixCreateSubscriptionResponse:
      properties:
        id:
          $ref: '#/components/schemas/NetflixSubscriptionId'
    NetflixCancelSubscription:
      required:
        - cancel_event_id
        - reason
      properties:
        cancel_event_id:
          $ref: '#/components/schemas/NetflixCancelEventID'
        reason:
          $ref: '#/components/schemas/NetflixCancelReason'
    NetflixGenerateUrl:
      required:
        - channel
        - partner_charge_country
        - token_error_url
        - type
      properties:
        channel:
          $ref: '#/components/schemas/NetflixBundleActivationChannel'
        partner_charge_country:
          $ref: '#/components/schemas/NetflixPartnerChargeCountry'
        promotion_id:
          $ref: '#/components/schemas/NetflixPromotionID'
        token_error_url:
          $ref: '#/components/schemas/NetflixTokenErrorURL'
        type:
          $ref: '#/components/schemas/NetflixTokenType'
        validity_duration_in_seconds:
          $ref: '#/components/schemas/NetflixValidityDurationInSeconds'
    NetflixGenerateUrlResponse:
      properties:
        expiry_date:
          $ref: '#/components/schemas/NetflixTokenExpiryDate'
        token:
          $ref: '#/components/schemas/NetflixToken'
        requested_securitized_url:
          $ref: '#/components/schemas/NetflixRequestedSecuritizedUrl'
    NetflixFetchSubscriptionEventsResponse:
      properties:
        events:
          description: List of zero or more Event objects that are relevant to the time period defined by startTimestamp and endTimestamp
          type: array
          items:
            $ref: '#/components/schemas/NetflixSubscriptionEvent'
        next_page_offset:
          description: A value that is used to retrieve subsequent pages of events that have occurred during the time period defined by the request attributes startTimestamp and endTimestamp. This value must be used to set the offset attribute for subsequent requests while using the same startTimestamp and endTimestamp.
          type: integer
          format: int32
          example: 10
    NetflixUpdateSubscription:
      required:
        - billing_event_id
      properties:
        billing_event_id:
          $ref: '#/components/schemas/NetflixBillingEventID'
        bundle_id:
          $ref: '#/components/schemas/NetflixBundleID'
        channel:
          $ref: '#/components/schemas/NetflixChannel'
        netflix_email:
          $ref: '#/components/schemas/NetflixEmail'
        netflix_offer_id:
          $ref: '#/components/schemas/NetflixOfferID'
        netflix_phone:
          $ref: '#/components/schemas/NetflixPhone'
        partner_charge_country:
          $ref: '#/components/schemas/NetflixPartnerChargeCountry'
        preferred_language:
          $ref: '#/components/schemas/NetflixPreferredLanguage'
    NetflixSuspend:
      required:
        - suspend_event_id
        - reason
      properties:
        suspend_event_id:
          description: The partner-provided reference identifier for the suspend event used for tracking.
          type: string
          example: c2a45099-1cda-4178-83a8-02c02356ea01
        reason:
          type: string
          x-extensible-enum:
            - PAYMENT_INSTRUMENT_FAILURE
            - PAYMENT_PAST_DUE
            - OTHER
          example: PAYMENT_INSTRUMENT_FAILURE
    NetflixUnsuspend:
      required:
        - unsuspend_event_id
      properties:
        unsuspend_event_id:
          description: The partner-provided reference identifier for the unsuspend event used for tracking.
          type: string
          example: c2a45099-1cda-4178-83a8-02c02356ea01
    NetflixBillingEventID:
      description: A reference for this transaction that can be used to track or reconcile this transaction, if needed in the future. Do not use a PAI value. Maximum size is 1024 bytes.
      type: string
      example: e307f177-091a-4840-9830-dda1c29eea44
    NetflixBundleActivationChannel:
      description: This attribute identifies the channel that the customer uses to activate the Bundle.
      type: string
      x-extensible-enum:
        - EMAIL
        - MOBILE
        - SMS
        - STORE
        - WEB
        - OTHER
      example: WEB
    NetflixBundleID:
      description: Describes your bundle offers. Each of your commercial bundle offers/plans should correspond to a unique BundleID. The BundleID is generated by Netflix. You are expected to pass it in the Update API when your customer changes from one bundle to another.
      type: string
      example: c2a45099-1cda-4178-83a8-02c02356ea01
    NetflixCancelEventID:
      description: A reference for this change/transaction that can be used to track/reconcile with the trigger for this event, if any is needed in future. Max 1024 is bytes.
      type: string
      example: c02a6e17-7bdd-4c1d-a56b-764bcd1bcf01
    NetflixCancelReason:
      description: Indicates the reason for cancellation.
      type: string
      x-extensible-enum:
        - CUSTOMER_CHANGES_PROVIDER
        - CUSTOMER_REQUESTED_CANCEL
        - CUSTOMER_SWITCHED_BUNDLE
        - FRAUD
        - OTHER
        - PAYMENT_INSTRUMENT_FAILURE
      example: CUSTOMER_REQUESTED_CANCEL
    NetflixChannel:
      description: This attribute identifies the channel that the customer uses to sign up for the Bundle.
      type: string
      x-extensible-enum:
        - STORE
        - TELESALES
        - DOOR_TO_DOOR
        - WEB
        - MOBILE
        - STB
        - OTHER
      example: WEB
    NetflixEmail:
      description: >
        The primary email address preferred by the customer. Value has to be in standard email format.

        - Netflix will only update the email address for the bundle enrollment if the customer has not yet activated their bundle.

        - Do not pass dummy email addresses for any customer. If you do not have the customer's primary or preferred email address, do not pass any email address.
      type: string
      example: test@email.com
    NetflixOfferID:
      description: >
        A pre-agreed upon UUID for each of the Netflix plans (Basic, Standard, Premium, and other Netflix plans) available in your bundle offers. This is the actual offer for which the customer will be enrolled. It must not have a value less than the Base Plan value for the associated BundleId.
        *Note*: A NetflixOfferID corresponds to one (1) Netflix streaming plan (e.g., 1S - Basic, 2S - Standard, 4S - Premium). For each NetflixOfferID, Netflix generates a Sandbox (for testing) and Production version.
      type: string
      example: 2106f808-36e9-402d-bf37-f1f7fa04776b
    NetflixPartnerAccountId:
      description: Partner Account Identifier (PAI) to associate an account in your system with a Netflix account.
      type: string
      example: 4567890123456789
    NetflixPartnerChargeCountry:
      description: Two letter codes that conform to ISO 3166-1
      type: string
      pattern: "^[A-Z]{2}$"
      example: ES
    NetflixPhone:
      description: The mobile phone number preferred by the customer. Value must be in the E.164 format. +[CountryCode][PhoneNumber]
      type: string
      pattern: "^\\+\\d{1,3}\\d{1,14}$"
      example: "+525512345678"
    NetflixPreferredLanguage:
      description: >
        The language in which the customer prefers to be contacted by email or SMS.

        - Netflix will continue adding newer languages as and when they start supporting them.

        - If the PreferredLanguages is not present or does not match the Netflix defined standard, then the language associated with the PartnerChargeCountry will be used by default.
      type: string
      x-extensible-enum:
        - ar
        - ar-SA
        - da
        - da-DK
        - de
        - de-DE
        - en
        - en-AU
        - en-CA
        - en-FR
        - en-GB
        - en-IE
        - en-IN
        - en-NZ
        - en-PH
        - en-US
        - es
        - es-AR
        - es-CO
        - es-CL
        - es-ES
        - es-MX
        - es-PE
        - es-US
        - fi
        - fr
        - fr-CA
        - fr-FR
        - it
        - it-IT
        - ja
        - ja-JP
        - ko
        - ko-KR
        - nl
        - nl-NL
        - nb
        - nb-NO
        - pl
        - pl-PL
        - pt-BR
        - pt-PT
        - ro
        - sv
        - sv-SE
        - th
        - th-TH
        - tr
        - tr-TR
        - zh-TW
      example: es-ES
    NetflixPromotionID:
      description: PromotionID agreed upon with Netflix. This only applies to prepaid promotion integrations.
      type: string
      example: PROMO_ID
    NetflixSubscriptionEvent:
      description: Subscription event. Future releases may add new fields without breaking backward compatibility.
      properties:
        bundle_id:
          $ref: '#/components/schemas/NetflixBundleID'
        event_type:
          description: Type of subscription event. The value must match one of the predefined SubscriptionEventType values. Future releases may add new values without breaking backward compatibility.
          type: string
          example: BUNDLE_ACTIVATION
        netflix_event_id:
          description: An ID that uniquely identifies an event. This ID can be used for deduplication.
          type: string
          example: 5a875d71-7deb-4693-a4d0-ae97aac9da8a
        netflix_offer_id:
          $ref: '#/components/schemas/NetflixOfferID'
        original_netflix_transaction_id:
          description: >
            This field is dependent on the type of event:

            - For the BUNDLE_PLAN_CHANGE event type, this field represents the NetflixTransactionID associated with the change event when a customer updated their Netflix plan via Netflix.

            - For the BUNDLE_SUSPENSION event type, this field represents the NetflixTransactionID that was returned by Netflix in response to the Suspend API request.

            - For the BUNDLE_UNSUSPENSION event type, this field represents the NetflixTransactionID that was returned by Netflix in response to the Suspend API request.
          type: string
          example: e307f177-091a-4840-9830-dda1c29eea44
        partner_account_id:
          $ref: '#/components/schemas/NetflixPartnerAccountId'
        partner_reference_id:
          description: >
            This field is dependent on the type of event:

            - For the BUNDLE_ENROLLMENT event type, this field represents the BillingEventID associated with the original Enroll API request that resulted in Netflix creating a new bundle for the customer.

            - For the BUNDLE_PLAN_CHANGE event type, this field represents the BillingEventID associated with the original Enroll API request that resulted in Netflix creating a new bundle for the customer. This applies when the plan change was initiated for and on-behalf of the customer via your website/CS.

            - For the BUNDLE_CANCELLATION event type, this field represents the CancelEventID associated with the original Cancel API request.

            - For the BUNDLE_SUSPENSION event type, this field represents the NetflixTransactionID that was returned by Netflix in response to the Suspend API request.

            - For the BUNDLE_UNSUSPENSION event type, this field represents the SuspendEventID associated with the original Suspend API request.
          type: string
          example: e307f177-091a-4840-9830-dda1c29eea44
        timestamp:
          description: Represents the time (milliseconds since the UNIX epoch) at which the event occurred.
          type: integer
          format: int64
          example: 1683710542
    NetflixSubscriptionEventType:
      description: Subscription event type
      type: string
      x-extensible-enum:
        - BUNDLE_ACTIVATION
        - BUNDLE_CANCELLATION
        - BUNDLE_DISCONNECTION
        - BUNDLE_ENROLLMENT
        - BUNDLE_PLAN_CHANGE
        - BUNDLE_SUSPENSION
        - BUNDLE_UNSUSPENSION
      example: BUNDLE_ACTIVATION
    NetflixSubscriptionId:
      description: Subscription identifier. Corresponds to the Partner Account Identifier (PAI).
      type: string
      example: 4567890123456789
    NetflixToken:
      description: Token value is a unique identifier based on UUID
      type: string
      example: 73e90548-b839-423f-be6d-7ed715de656e
    NetflixRequestedSecuritizedUrl:
      description: RequestedSecuritizedUrl use token value to reference a Netflix url
      type: string
      example: https://www.sandbox.netflix.com/partner/home?ptoken=73e90548-b839-423f-be6d-7ed715de656e
    NetflixTokenErrorURL:
      description: >
        If a token is invalid, the customer cannot complete the bundle activation. In that case, Netflix will present a call to action where Netflix can redirect the user.
        You should provide the URL that corresponds with the correct page on your site where the user can restart the flow.
      type: string
      example: https://www.example.com/error/token
    NetflixTokenExpiryDate:
      description: Date when token expires in ISO 8601 format.
      type: string
      example: 2023-05-20T14:32:45+02:00
    NetflixTokenType:
      description: The token type indicates the purpose of the token and its intended usage.
      type: string
      x-extensible-enum:
        - ACCOUNT_RECOVERY
        - BUNDLE
        - INT_PAY
        - PROMO
      example: BUNDLE
    NetflixValidityDurationInSeconds:
      description: >
        For ACCOUNT_RECOVERY token type only. This value can be up to 24 hours.
        The token expiration defaults to 12 hours if not provided.
        Please initiate the Token request once the customer has clicked on the call to action on your website and before you redirect the customer to Netflix.
      type: integer
      format: int32
      example: 43200
    NetflixGetSubscriptionStatusResponse:
      type: object
      properties:
        has_partner_mop:
          type: boolean
        product_type:
          type: string
        subscription:
          $ref: '#/components/schemas/NetflixSubscription'
        bundle:
          $ref: '#/components/schemas/NetflixBundle'
    NetflixSubscription:
      type: object
      properties:
        plan:
          $ref: '#/components/schemas/NetflixPlan'
    NetflixPlan:
      type: object
      properties:
        localized_type:
          type: string
        type:
          type: string
    NetflixBundle:
      type: object
      properties:
        id:
          type: string
        offer_id:
          type: string
        status:
          type: string

    HboCreateSubscription:
      required:
        - service_id
        - external_id
        - country
        - product_code
        - product_start_date
      properties:
        service_id:
          $ref: '#/components/schemas/HboServiceId'
        external_id:
          $ref: '#/components/schemas/HboExternalId'
        country:
          $ref: '#/components/schemas/HboCountry'
        product_code:
          $ref: '#/components/schemas/HboProductCode'
        product_name:
          $ref: '#/components/schemas/HboProductName'
        product_start_date:
          $ref: '#/components/schemas/HboProductStartDate'
        product_expire_date:
          $ref: '#/components/schemas/HboProductExpireDate'
        product_renew_date:
          $ref: '#/components/schemas/HboProductRenewDate'
    HboCreateSubscriptionResponse:
      $ref: '#/components/schemas/WorkflowResponse'
    HboCancelSubscription:
      required:
        - external_id
        - reason
        - product_code
      properties:
        external_id:
          $ref: '#/components/schemas/HboExternalId'
        reason:
          $ref: '#/components/schemas/HboReason'
        product_code:
          $ref: '#/components/schemas/HboProductCode'
        product_expire_date:
          $ref: '#/components/schemas/HboProductExpireDate'
    HboCancelSubscriptionResponse:
      $ref: '#/components/schemas/WorkflowResponse'
    HboGenerateActivationUrl:
      required:
        - external_id
        - product_code
        - product_start_date
      properties:
        external_id:
          $ref: '#/components/schemas/HboExternalId'
        country:
          $ref: '#/components/schemas/HboCountry'
        product_code:
          $ref: '#/components/schemas/HboProductCode'
        product_name:
          $ref: '#/components/schemas/HboProductName'
        product_start_date:
          $ref: '#/components/schemas/HboProductStartDate'
        product_expire_date:
          $ref: '#/components/schemas/HboProductExpireDate'
        product_renew_date:
          $ref: '#/components/schemas/HboProductRenewDate'
        transaction_id:
          $ref: '#/components/schemas/HboTransactionId'
    HboGenerateActivationURLResponse:
      properties:
        url:
          $ref: '#/components/schemas/HboActivationURL'

    WorkflowResponse:
      properties:
        message:
          type: string
          example: message
        workflowId:
          type: string
          example: workflowId
        runId:
          type: string
          example: workflowId

    HboServiceId:
      description: Service identifier in HBO. Corresponds to Subscription Id.
      type: string
      example: 1234567890123456
    HboExternalId:
      description: Partner user identifier in HBO. It's the Id in CRM.
      type: string
      example: 1234567890123456
    HboCountry:
      description: Country code. ISO 3166-1 alpha-2 code.
      type: string
      maxLength: 2
      minLength: 2
      example: ES
    HboProductCode:
      description: Product code
      type: string
      example: HBO
    HboProductName:
      description: Product name
      type: string
      example: HBO
    HboProductStartDate:
      description: Product start date
      type: string
      format: date-time
      example: 2021-01-01T00:00:00Z
    HboProductExpireDate:
      description: Product expire date
      type: string
      format: date-time
      example: 2021-01-01T00:00:00Z
    HboProductRenewDate:
      description: Product renew date
      type: string
      format: date-time
      example: 2021-01-01T00:00:00Z
    HboReason:
      description: Reason for the cancellation
      type: string
      enum:
        - PRODUCT_CANCELED
        - PRODUCT_CHANGED
        - OFFER_EXPIRED
      example: PRODUCT_CANCELED
    HboActivationURL:
      description: Activation URL.
      type: string
      example: https://www.example.com/activation/123
    HboTransactionId:
      description: ID of the transaction that granted the user access to the product.
      type: string
      example: 4567890123456789

    FtthOrangeAccessResponse:
      type: object
      properties:
        address:
          type: string
          example: "address"
        brand:
          type: string
          example: "brand"
        cVlan:
          type: string
          example: "cVlan"
        code:
          type: string
          example: "code"
        cto:
          type: string
          example: "cto"
        ctoAddress:
          type: string
          example: "ctoAddress"
        ctoLocation:
          type: string
          example: "ctoLocation"
        ctoPort:
          type: string
          example: "ctoPort"
        ctoType:
          type: string
          example: "ctoType"
        derivationBoxCode:
          type: string
          example: "derivationBoxCode"
        derivationBoxLocation:
          type: string
          example: "derivationBoxLocation"
        description:
          type: string
          example: "description"
        deviceBrand:
          type: string
          example: "deviceBrand"
        deviceModel:
          type: string
          example: "deviceModel"
        documentNumber:
          type: string
          example: "documentNumber"
        documentType:
          type: string
          example: "documentType"
        footprint:
          type: string
          example: "footprint"
        gescal37:
          type: string
          example: "gescal37"
        idAddressTo:
          type: string
          example: "idAddressTo"
        iptv:
          type: string
          example: "iptv"
        iua:
          type: string
          example: "iua"
        iuaBillingWholesale:
          type: string
          example: "iuaBilling"
        lagAdministrative:
          type: string
          example: "valores#valores"
        message:
          type: string
          example: "message"
        modality:
          type: string
          example: "modality"
        oltCard:
          type: string
          example: "oltCard"
        oltCode:
          type: string
          example: "oltCode"
        oltModel:
          type: string
          example: "oltModel"
        oltPort:
          type: string
          example: "oltPort"
        ontId:
          type: string
          example: "ontId"
        ontManufacturer:
          type: string
          example: "ont"
        ontPassword:
          type: string
          example: "ontPassword"
        phoneNumber:
          type: string
          example: "phoneNumber"
        ppai:
          type: string
          example: "ppai"
        sVlan:
          type: string
          example: "sVlan"
        splitterId:
          type: string
          example: "splitterId"
        splitterType:
          type: string
          example: "splitterType"
        tv:
          type: string
          example: "tv"
        verticalManager:
          type: string
          example: "verticalManager"
    GetFtthAccesesInfoResponse:
      type: object
      properties:
        brand:
          type: string
          example: "yoigo"
        footprint:
          type: string
          example: "yoigo"
        phone_number:
          type: string
          example: "600000000"
        document:
          type: string
          example: "11111111K"
        document_type:
          type: string
          example: "NIF"
        iua:
          type: string
          example: "M15904010OS7"
        gescal:
          type: string
          example: "15000181339400017         004DCHA    "
        address:
          type: string
          example: "Calle las flores,5, Madrid, 28000"
        tv:
          type: boolean
          description: indicates wether its has service or not
          example: "true"
        domicile_id:
          type: string
          example: "MR000000000000000000000000000000812874"
        cto:
          type: string
          example: "FE6013110C020"
        cto_type:
          type: string
          example: "CTO 8"
        cto_location:
          type: string
          example: "NATURAIS DE FENE 17, AVENIDA"
        cto_install_type:
          type: string
          example: "FACHADA"
        splitter:
          type: string
          example: "110020.1"
        splitter_type:
          type: string
          example: "1:16"
        cto_port:
          type: integer
          example: 1
        cd:
          type: string
          example: "string"
        cd_type:
          type: string
          example: "INDEFINIDO"
        cd_location:
          type: string
          example: "INDEFINIDO"
        olt:
          type: string
          example: "107FE60131"
        olt_type:
          type: string
          example: "C600"
        olt_sw_version:
          type: string
          example: "V100R019C10SPH210"
        olt_card:
          type: integer
          example: 3
        gpon_port:
          type: integer
          example: 8
        ont_id:
          type: integer
          example: 2
        tesa_ont_id:
          type: string
          example: 2890384092f
        ont_password:
          type: string
          example: "812874"
        ppai:
          type: string
          example: "M1599959"
        template:
          type: string
          example: "1000M_1000M_TV_RES_XPM-DHCP_EKT"
        remote_id:
          type: string
          example: "RD20721131812874"
        remote_id_tv:
          type: string
          example: "string"
        vertical_manager:
          type: string
          example: "904"
        vlan:
          type: integer
          example: 1000
        s_vlan:
          type: integer
          example: 1000
        c_vlan:
          type: integer
          example: 1000
        device_brand:
          type: string
          example: "SCOMFG824CDv2M"
        device_model:
          type: string
          example: FG824CD
        fw_version:
          type: string
          example: "FG824MM3115"
        serial_number:
          type: string
          example: "2183128443"
        device_identity:
          type: string
          example: "2183128443"
        iua_wholesaler_fact:
          type: string
          example: "11650007043333"
        administrative_lag:
          type: string
          example: "v1165002#1"
        modality:
          type: string
          example: "300M_300M"

    RetentionsRequest:
      required:
        - reuseAccess
        - destination
      properties:
        reuseAccess:
          type: boolean
          description: "Reuse access"
          example: true
        source:
          type: object
          properties:
            gescal37:
              type: string
              description: Gescal37 of the source client. Mandatory if reuseAccess="true"
            iua:
              type: string
              description: IUA of the source client. Mandatory if reuseAccess="true"
            phoneNumber:
              type: string
              description: Phone number of the source client. Mandatory if reuseAccess="true"
            documentNumber:
              type: string
              description: Document number of the source client. Mandatory if reuseAccess="true"
            clientName:
              type: string
              description: Client name of the source client. Mandatory if reuseAccess="true"
            brand:
              type: string
              description: Brand of the source client. Mandatory if reuseAccess="true"
        destination:
          type: object
          required:
            - gescal37
            - brand
            - bandwidth
            - customerType
          properties:
            gescal37:
              type: string
              description: Gescal37 of the destination client
            iua:
              type: string
              description: IUA of the destination client
            phoneNumber:
              type: string
              description: Phone number of the destination client
            documentNumber:
              type: string
              description: Document number of the destination client
            clientName:
              type: string
              description: Client name of the destination client
            brand:
              type: string
              description: Brand of the destination client
            bandwidth:
              type: string
              description: Contracted speed
            customerType:
              type: string
              description: Segment of the destination client
            tv:
              type: string
              description: "TV contracted of the destination brand. Allowed values: OTT,IPTV,IPTV+OTT"
              example: OTT
    RetentionsResponse:
      type: object
      properties:
        code:
          type: string
          example: "000"
          description: "Code identifying the possible results of the operation"
        description:
          type: string
          example: "Operation successful"
          description: "Displays the code description of the result obtained"
        message:
          type: string
          example: "OK"
          description: "OK/KO"

    InsuranceCreationRequestDTO:
      type: object
      properties:
        documentId:
          type: string
          example: 00000000F
        firstName:
          type: string
          example: juan
        lastName1:
          type: string
          example: perez
        lastName2:
          type: string
          example: perez
        msisdn:
          type: string
          example: '666666666'
        address:
          type: string
          example: "paseo de castellana, 4, 002B"
        email:
          type: string
          example: d@g.com
        zipCode:
          type: string
          example: '28000'
        locality:
          type: string
          example: madrid
        province:
          type: string
          example: madrid
        language:
          type: string
          example: >-
            allowed values: es => castellano, eu=> euskera, ga=>gallego,
            ca=>catalán
        sfid:
          type: string
          example: '1234'
        telcoBrand:
          type: string
          example: Masmovil
        brand:
          type: string
        model:
          type: string
        price:
          type: number
          example: 2.2
        clientType:
          type: string
          example: Autónomo
        invoicePayment:
          type: boolean
        productType:
          type: string
          example: Móvil
        imei:
          type: string
        terminalSaleDate:
          type: string
          format: date
          example: '2022-01-31T23:00:00Z'
        entity:
          type: string
        officeCode:
          type: string
        dc:
          type: string
        accountNumber:
          type: string
    InsuranceCreationResponseDTO:
      type: object
      properties:
        requestId:
          type: string
        policyNumber:
          type: string
        monthlyFee:
          type: number
          example: 2.2
        annualFee:
          type: number
          example: 2.2
        franchise:
          type: boolean
        franchiseAmount:
          type: number
          example: 2.2
        theft:
          type: boolean
        monthlyNetFee:
          type: number
          example: 2.2
        annualNetFee:
          type: number
          example: 2.2
        annualLea:
          type: number
          example: 2.2
        monthlyLea:
          type: number
          example: 2.2
        annualIps:
          type: number
          example: 2.2
        monthlyIps:
          type: number
          example: 2.2
        annualConsortium:
          type: number
          example: 2.2
        monthlyConsortium:
          type: number
          example: 2.2
        firstAnnualLea:
          type: number
          example: 2.2
        firstMonthlyConsortium:
          type: number
          example: 2.2
        firstAnnualIps:
          type: number
          example: 2.2
        firstAnnualNetFee:
          type: number
          example: 2.2
        firstAnnualFee:
          type: number
          example: 2.2
    InsuranceIssueRequestDTO:
      type: object
      properties:
        requestId:
          type: string
          example: 00000000JIUSCS
        policyNumber:
          type: string
          example: 87912HDH
        imei:
          type: string
          example: imei
        msisdn:
          type: string
          example: '666666666'
        document:
          type: string
          example: 000000000K
        subscriptionId:
          type: string
          example: SNMC893CNIE
    InsuranceIssueResponseDTO:
      type: object
      properties:
        requestId:
          type: string
        policyNumber:
          type: string
        monthlyFee:
          type: number
          example: 2.2
        annualFee:
          type: number
          example: 2.2
        franchise:
          type: boolean
        franchiseAmount:
          type: number
          example: 2.2
        theft:
          type: boolean
    InsuranceCancellationRequestDTO:
      type: object
      properties:
        policyNumber:
          type: string
          example: 87912HDH
        document:
          type: string
          example: 000000000K
        reason:
          type: string
          example: Reason is...
    InsuranceCancellationResponseDTO:
      type: object
      properties:
        result:
          type: boolean
    InsuranceInfoResponseDTO:
      type: object
      properties:
        certificateNumber:
          type: string
        imei:
          type: string
        brand:
          $ref: '#/components/schemas/NameDTO'
        model:
          $ref: '#/components/schemas/DescriptionDTO'
        phoneNumber:
          type: string
        document:
          type: string
        firstName:
          type: string
        lastName1:
          type: string
        lastName2:
          type: string
        address:
          type: string
        number:
          type: string
        city:
          type: string
        zipCode:
          type: string
        policyNumber:
          type: string
        province:
          type: string
        effectiveDate:
          type: string
          format: date
          example: '2022-01-31T23:00:00Z'
        email:
          type: string
        sold:
          type: boolean
        cancelled:
          type: boolean
        cancellationDate:
          type: string
          format: date
          example: '2022-01-31T23:00:00Z'
        serialNumber:
          type: string
        paymentMethod:
          $ref: '#/components/schemas/DescriptionDTO'
        clientType:
          $ref: '#/components/schemas/NameDTO'
        billPayment:
          type: boolean
        withdrawal:
          type: boolean
        withdrawalDate:
          type: string
          format: date
          example: '2022-01-31T23:00:00Z'
        emitted:
          type: boolean
        language:
          $ref: '#/components/schemas/NameDTO'
        accident:
          type: boolean
    NameDTO:
      type: object
      properties:
        name:
          type: string
    DescriptionDTO:
      type: object
      properties:
        description:
          type: string
    errorResponseDtoDeviceInsurance:
      type: object
      properties:
        code:
          type: string
        message:
          type: string

    errorResponseDto:
      type: object
      properties:
        result:
          type: string
        error_code:
          type: string
        error_description:
          type: string
    ActivateSubscription:
      required:
        - firstName
        - maxTerminals
        - spId
        - customerType
      properties:
        email:
          $ref: '#/components/schemas/Email'
        firstName:
          $ref: '#/components/schemas/FirstName'
        lastName:
          $ref: '#/components/schemas/LastName'
        ftthWorkOrderId:
          $ref: '#/components/schemas/FtthWorkOrderId'
        maxStb:
          $ref: '#/components/schemas/MaxStb'
        maxTerminals:
          $ref: '#/components/schemas/MaxTerminals'
        password:
          $ref: '#/components/schemas/Password'
        postalCode:
          $ref: '#/components/schemas/PostalCode'
        segment:
          $ref: '#/components/schemas/Segment'
        phoneNumber:
          $ref: '#/components/schemas/PhoneNumber'
        spId:
          $ref: '#/components/schemas/SpId'
        spendingLimit:
          $ref: '#/components/schemas/SpendingLimit'
        customerType:
          $ref: '#/components/schemas/CustomerType'
        servicePlan:
          $ref: '#/components/schemas/ServicePlan'
        externalID:
          $ref: '#/components/schemas/ExternalID'
        ftthServiceID:
          $ref: '#/components/schemas/FtthServiceID'
        experience:
          $ref: '#/components/schemas/Experience'
    ModifySubscription:
      required:
        - servicePlanToAdd
        - servicePlanToDelete
      properties:
        segment:
          $ref: '#/components/schemas/Segment'
        servicePlanToAdd:
          $ref: '#/components/schemas/ServicePlanToAdd'
        servicePlanToDelete:
          $ref: '#/components/schemas/ServicePlanToDelete'
        experience:
          $ref: '#/components/schemas/Experience'
    ModifyCustomer:
      properties:
        ftthWorkOrderId:
          $ref: '#/components/schemas/FtthWorkOrderId'
        password:
          $ref: '#/components/schemas/Password'
        parentalPin:
          $ref: '#/components/schemas/ParentalPin'
        email:
          $ref: '#/components/schemas/Email'
        postalCode:
          $ref: '#/components/schemas/PostalCode'
        spendingLimit:
          $ref: '#/components/schemas/SpendingLimit'
        experience:
          $ref: '#/components/schemas/Experience'
    CancelSubscriptionRequest:
      type: object
      required:
        - creationWorkflowId
      properties:
        creationWorkflowId:
          type: string
          example: provision_OrangeTvActivationWf_33348e03-7b85-4cf9-a933-a04e74766acb

    GetDevicesResponse:
      type: array
      items:
        $ref: '#/components/schemas/Terminal'
    Terminal:
      properties:
        macAddress:
          type: string
        name:
          type: string
        modelExternalId:
          type: string
        registrationDate:
          type: string
        serialNumber:
          type: string
        vua:
          type: string
        stbSn:
          type: string
    CustomerType:
      description: Customer type
      type: string
      example: iptv/ott
    Email:
      description: Email
      type: string
      example: email@emil.com
    FirstName:
      description: First Name
      type: string
      example: First name
    LastName:
      description: Last name
      type: string
      example: Last name
    MaxStb:
      description: Max stb
      type: string
      example: Max stb
    MaxTerminals:
      description: Max terminals
      type: string
      example: max terminals
    PhoneNumber:
      description: Phone number
      type: string
      example: +40828383874
    PostalCode:
      description: Postal code
      type: string
      example: 987564
    Segment:
      type: string
      enum: [ CONSUMER ]
      description: Segment
      example: Segment
    SpendingLimit:
      description: Spending limit
      type: number
      example: 1234554
    SpId:
      description: Sp id
      type: string
      example: spId
    FtthWorkOrderId:
      description: FTTH work order identifier
      type: string
      example: MYSIM_123456
    ServicePlanToAdd:
      description: Service type list to add
      type: array
      items:
        type: string
      example: [ "spId-1", "spId-2", "spId-3" ]
    ServicePlanToDelete:
      description: Service type list to delete
      type: array
      items:
        type: string
      example: [ "spId-1", "spId-2", "spId-3" ]
    Password:
      description: password
      type: string
      example: "pass1234"
    ParentalPin:
      description: Parental PIN
      type: string
      example: "1234"
    ServicePlan:
      description: Service plan for creation without FTTH
      type: array
      items:
        type: string
      example: [ "spId-1", "spId-2", "spId-3" ]
    ExternalID:
      description: Identifier of the subscription on the CRM
      type: string
      example: "external_subscription_12345"
    FtthServiceID:
      description: For north brands where we don't have the order on wo_data, we use ftthServiceId.
      type: string
      example: "ftth_service_67890"
    Experience:
      description: Tv flavour
      type: string
      nullable: true
      example: "VuelaTV"

    TesaActivationRequest:
      type: object
      properties:
        territoryOwner:
          type: string
          enum: [ NEBA, VULA_COMMERCIAL, VULA_REGULATED ]
          description: >
            Territory owner:
             * `NEBA` - Neba
             * `VULA_COMMERCIAL` - Vula commercial
             * `VULA_REGULATED` - Vula regulated
        portabilityIndicator:
          type: string
          enum: [ D, T, N, A ]
          description: >
            Portability type:
             * `D` - Donor
             * `T` - Third party
             * `N` - Without portability
             * `A` - Agreement
        externalReference:
          type: string
          pattern: '\w{1,50}'
        technicalCoordinators:
          $ref: '#/components/schemas/TesaTechnicalCoordinators'
        customer:
          $ref: '#/components/schemas/TesaCustomer'
        servicePoint:
          $ref: '#/components/schemas/TesaServicePoint'
      required:
        - territoryOwner
        - externalReference
        - technicalCoordinators
        - customer
        - servicePoint
    TesaTechnicalCoordinators:
      type: object
      properties:
        name:
          type: string
          pattern: '\w{0,50}'
        surnames:
          type: string
          pattern: '\w{0,50}'
        phoneNumbers:
          $ref: '#/components/schemas/TesaPhoneNumbers'
        emails:
          $ref: '#/components/schemas/TesaEmails'
        fax:
          type: string
          pattern: '\d{4,14}'
      required:
        - name
        - surnames
        - phoneNumbers
        - emails
        - fax
    TesaCustomer:
      type: object
      properties:
        name:
          type: string
          pattern: '\w{0,50}'
        surnames:
          type: string
          pattern: '\w{0,50}'
        segment:
          type: string
          enum: [ B2C, B2B, B2B2C ]
          description: >
            Territory owner:
             * `B2C` - Consumer
             * `B2B` - Business
             * `B2B2C` - Business to business to consumer
        phoneNumbers:
          $ref: '#/components/schemas/TesaPhoneNumbers'
      required:
        - name
        - surnames
        - phoneNumbers
        - segment
    TesaServicePoint:
      type: object
      properties:
        gescal:
          type: string
          pattern: '[\w ]{37}'
        comments:
          type: string
          pattern: '\w{0,255}'
        iua:
          type: string
          pattern: '\w{0,12}'
        ppai:
          type: string
          pattern: '\w{0,14}'
        opVlan:
          type: string
          pattern: '\w{0,5}'
        speed:
          $ref: '#/components/schemas/TesaSpeed'
        installation:
          $ref: '#/components/schemas/TesaInstallation'
        maintenance:
          $ref: '#/components/schemas/TesaMaintenance'
        portability:
          $ref: '#/components/schemas/TesaPortability'
      required:
        - speed
        - installation
        - maintenance
    TesaResult:
      type: object
      properties:
        message:
          type: string
        runId:
          type: string
        workflowId:
          type: string
    TesaPhoneNumbers:
      type: object
      properties:
        principal:
          type: string
          pattern: '\d{4,14}'
        alternative:
          type: string
          pattern: '\d{4,14}'
      required:
        - principal
        - alternative
    TesaEmails:
      type: object
      properties:
        principal:
          type: string
          pattern: '^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$'
        alternative:
          type: string
          pattern: '^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$'
      required:
        - principal
        - alternative
    TesaSpeed:
      type: object
      properties:
        upload:
          type: string
        download:
          type: string
      required:
        - upload
        - download
    TesaMaintenance:
      type: object
      properties:
        indicator:
          type: boolean
          nullable: true
        type:
          type: string
          nullable: true
          enum: [ DSI ]
          description: >
            Maintenance type:
             * `DSI` - Next day
    TesaInstallation:
      type: object
      properties:
        ptro:
          type: boolean
          nullable: true
        ont:
          type: string
          nullable: true
          enum: [ N, R ]
          description: >
            Document type:
             * `N` - No
             * `R` - Resale
    TesaPortability:
      type: object
      properties:
        phoneNumber:
          type: string
          pattern: '\d{4,14}'
        documentType:
          type: string
          enum: [ L, D, R, P ]
          description: >
            Document type:
             * `L` - CIF
             * `D` - DNI
             * `R` - NIE
             * `P` - Passport
        documentNumber:
          type: string
          maxLength: 17
        accessType:
          type: string
          enum: [ '01', '03' ]
          description: >
            Document type:
             * `01` - INDIVIDUAL
             * `03` - MULTIPLE
        nrn:
          type: string
          pattern: '\w{0,6}'
        phoneRange:
          $ref: '#/components/schemas/TesaPhoneRange'
        wholeNumbering:
          type: boolean
        resellerDonor:
          $ref: '#/components/schemas/TesaReseller'
        resellerRecipient:
          $ref: '#/components/schemas/TesaReseller'
    TesaPhoneRange:
      type: object
      properties:
        initial:
          type: string
          pattern: '\d{4,14}'
        final:
          type: string
          pattern: '\d{4,14}'
      required:
        - initial
        - final
    TesaReseller:
      type: object
      properties:
        name:
          type: string
          pattern: '\w{0,80}'
        document:
          type: string
          pattern: '\w{0,9}'
      required:
        - name
        - document
    TesaTerminationRequest:
      type: object
      properties:
        territoryOwner:
          type: string
          enum: [ NEBA, VULA_COMMERCIAL, VULA_REGULATED ]
          description: >
            Territory owner:
             * `NEBA` - Neba
             * `VULA_COMMERCIAL` - Vula commercial
             * `VULA_REGULATED` - Vula regulated
        externalReference:
          type: string
          pattern: '\w{1,50}'
        technicalCoordinators:
          $ref: '#/components/schemas/TesaTechnicalCoordinators'
        customer:
          $ref: '#/components/schemas/TesaCustomer'
        servicePoint:
          $ref: '#/components/schemas/TesaTerminationServicePoint'
      required:
        - territoryOwner
        - externalReference
        - technicalCoordinators
        - customer
        - servicePoint
    TesaTerminationServicePoint:
      type: object
      properties:
        iua:
          type: string
          pattern: '\w{0,12}'
        administrative:
          type: string
          pattern: '\w{0,14}'
      required:
        - iua
    TesaModificationRequest:
      type: object
      properties:
        externalReference:
          type: string
          pattern: '\w{1,50}'
          example: "MYSIM_10750439"
        territoryOwner:
          type: string
          enum: [ NEBA, VULA_COMMERCIAL, VULA_REGULATED ]
          description: >
            Territory owner:
             * `NEBA` - Neba
             * `VULA_COMMERCIAL` - Vula commercial
             * `VULA_REGULATED` - Vula regulated
          example: "NEBA"
        technicalCoordinators:
          $ref: '#/components/schemas/TesaTechnicalCoordinators'
        customer:
          $ref: '#/components/schemas/TesaCustomer'
        servicePoint:
          $ref: '#/components/schemas/TesaServicePoint'
      required:
        - territoryOwner
        - externalReference
        - technicalCoordinators
        - customer
        - servicePoint
    TesaCancellationRequest:
      type: object
      properties:
        externalReference:
          type: string
          pattern: '\w{1,50}'
      required:
        - externalReference
    TesaIncidentResolveRequest:
      type: object
      properties:
        externalReference:
          type: string
          pattern: '\w{1,50}'
        observations:
          type: string
      required:
        - externalReference
    TesaCreateAccessRequest:
      type: object
      properties:
        externalReference:
          type: string
        technicianCode:
          type: string
          pattern: '\w{1,10}'
        reason:
          type: string
      required:
        - externalReference
        - technicianCode
    TesaCreateStatusCtoRequest:
      type: object
      properties:
        externalReference:
          type: string
      required:
        - externalReference
    TesaCreatePortRequest:
      type: object
      properties:
        externalReference:
          type: string
        port:
          type: string
      required:
        - externalReference
        - port
    TesaTerminateAccessRequest:
      type: object
      properties:
        externalReference:
          type: string
        observations:
          type: string
          pattern: '\w{1,255}'
      required:
        - externalReference
        - observations
    TesaInstallationIncidentRequest:
      type: object
      properties:
        externalReference:
          type: string
        requestType:
          type: string
        requestNumber:
          type: integer
          format: int64
        subRequestNumber:
          type: integer
          format: int64
        incidence:
          type: string
        cto:
          type: string
        comments:
          type: string
      required:
        - externalReference
        - requestType
        - requestNumber
        - subRequestNumber
        - incidence
        - cto
        - comments
    TesaInstallationEndRequest:
      type: object
      properties:
        externalReference:
          type: string
        requestType:
          type: string
          enum: [ NEBA, VULA ]
        requestNumber:
          type: integer
          format: int64
        subRequestNumber:
          type: integer
          format: int64
        test:
          type: string
        indicator:
          type: string
        owner:
          type: string
      required:
        - externalReference
        - requestType
        - requestNumber
        - subRequestNumber
        - test
        - indicator
        - owner
    TesaCtoChangeRequest:
      type: object
      properties:
        externalReference:
          type: string
        ctoIdentifier:
          type: string
        ctoPort:
          type: string
        reason:
          $ref: '#/components/schemas/TesaReasonForCtoChange'
      required:
        - externalReference
        - ctoIdentifier
        - reason
    TesaMaintenanceCtoChangeRequest:
      type: object
      properties:
        externalReference:
          type: string
          pattern: '\w{1,50}'
          example: "MYSIM_10750439"
        territoryOwner:
          type: string
          enum: [ NEBA, VULA_COMMERCIAL, VULA_REGULATED ]
          description: >
            Territory owner:
             * `NEBA` - Neba
             * `VULA_COMMERCIAL` - Vula commercial
             * `VULA_REGULATED` - Vula regulated
        iua:
          type: string
          pattern: '\w{0,12}'
          example: "135034050981"
        ctoIdentifier:
          type: string
          example: "073687"
        ctoPort:
          type: string
          example: "010"
        reason:
          $ref: '#/components/schemas/TesaReasonForCtoChange'
      required:
        - externalReference
        - iua
        - territoryOwner
        - ctoIdentifier
        - reason
    TesaReasonForCtoChange:
      type: string
      description: |
        Reason for the CTO change:
         * `AV` - Broken
         * `OT` - Others
      enum:
        - AV
        - OT
    TesaStatus:
      type: string
      enum:
        - NOT_SENT
        - VALIDATING
        - REJECTED
        - PROCESSING
        - PROCESSED
        - INCIDENCE_TESA
        - INCIDENCE_OPERATOR
        - INSTALLING
        - INCIDENCE_INSTALLING
        - INSTALLED
        - CANCELED
        - FINISHED
    TesaPersistenceType:
      type: string
      description: |
        Persistence type:
         * `ACTIVATION` - Activation Request
         * `TERMINATION` - Termination Request
      enum:
        - ACTIVATION
        - TERMINATION
    TesaReferenceId:
      type: string
    TesaReferenceIdList:
      example: [ "REQUEST_ID11001", "REQUEST_ID11002" ]
      type: array
      items:
        $ref: '#/components/schemas/TesaReferenceId'
    TesaError:
      properties:
        code:
          type: string
        message:
          type: string
      required:
        - code
        - message
      type: object
    TesaRequest:
      example:
        reference_id: EXAMPLE_01_PRUEBA
        request_type: NEB101
        persistence_type: ACTIVATION
        territory_owner: NEBA
        tenant: masmovil
        request_number: 2312312
        subrequest_number: 1
        external_reference: external_reference
        status: PROCESSING
        cancelling: false
        portability_indicator: N
        technical_coordinator:
          name: tec_name
          surnames: tec_surnames
          principal_phone_number: "612345789"
          alternative_phone_number: "612345790"
          email: email@email.es
          alternative_email: alternative_email@email.es
          fax: "612345791"
        customer_contact:
          name: cus_name
          surnames: cus_surnames
          phone_number: "612345792"
          phone_number_2: "612345793"
          segment: B2C
        service_point:
          gescal: 09827372837277273727
          upload_speed: 1M
          download_speed: 10M
        connection:
          connection_test: S,
          connection_reuse_indicator: S,
          connection_owner: MM,
          status: READY_TO_CONNECTION_STAMPING,
          create_date: 2024-05-07T15:13:49Z
        connection_data:
          iua: iua,
          province_code: 30,
          town: town,
          address: address,
          splitter_indicator: S,
          splitter_location: RE,
          splitter_detail: splitter_detail,
          cto_type: cto_type,
          cto_location: location,
          cto_location_detail: detail,
          cto_identifier: cto_id,
          cto_port: 111
      properties:
        reference_id:
          description: Operator id reference
          maxLength: 21
          minLength: 13
          type: string
        request_number:
          description: Request code returned by TESA
          format: int64
          type: integer
        subrequest_number:
          description: Subrequest code returned by TESA
          format: int64
          type: integer
        request_type:
          description: "Request type e.g NEB101, NBL101"
          maxLength: 6
          minLength: 6
          type: string
        persistence_type:
          $ref: '#/components/schemas/TesaPersistenceType'
        territory_owner:
          description: |
            Territory Owner identifier:
             * `NEBA` - Neba
             * `VULA_COMMERCIAL` - Vula commercial
             * `VULA_REGULATED` - Vula regulated
          enum:
            - NEBA
            - VULA_COMMERCIAL
            - VULA_REGULATED
          type: string
        tenant:
          description: "Tenant in lower case"
          maxLength: 50
          type: string
        portability:
          $ref: '#/components/schemas/TesaPortability'
        technical_coordinator:
          $ref: '#/components/schemas/TesaTechnicalCoordinators'
        customer_contact:
          $ref: '#/components/schemas/TesaCustomerContact'
        service_point:
          $ref: '#/components/schemas/TesaServicePoint'
        status:
          $ref: '#/components/schemas/TesaStatus'
        connection:
          $ref: '#/components/schemas/TesaConnection'
        connection_data:
          $ref: '#/components/schemas/TesaConnectionData'
        cancelling:
          description: "Whether the request is being cancelled"
          type: boolean
          default: false
        portability_indicator:
          description: |
            Portability indicator:
             * `D` - Donor
             * `T` - Third party
             * `N` - Without portability
             * `A` - Agreement
          enum:
            - D
            - T
            - "N"
            - A
          type: string
        external_reference:
          description: External reference
          maxLength: 255
          type: string
        reject_cause:
          description: Reject cause
          maxLength: 20
          type: string
        close_date:
          description: Close date
          example: 2023-05-31T08:50:40Z
          format: date-time
          type: string
        create_date:
          description: Create date
          example: 2023-05-31T08:50:40Z
          format: date-time
          type: string
        update_date:
          description: Update date
          example: 2023-05-31T08:50:40Z
          format: date-time
          type: string
      required:
        - reference_id
        - request_type
        - persistence_type
        - territory_owner
        - tenant
        - external_reference
        - technical_coordinator
        - customer_contact
        - service_point
        - status
      type: object
    TesaEvent:
      example:
        id: 1
        sequence_number: 1
        reference_id: reference_id
        request_number: 0
        event_date: 2023-05-31T08:50:40Z
        message_type: message_type
        subrequest_number: 6
        inconsistent: false
      properties:
        id:
          description: Event id
          format: int64
          type: integer
        reference_id:
          description: Request reference id
          type: string
        message_type:
          description: TESA message type
          type: string
        request_number:
          description: TESA request code
          format: int64
          type: integer
        subrequest_number:
          description: TESA subrequest code returned
          format: int64
          type: integer
        event_date:
          description: Event date
          example: 2023-05-31T08:50:40Z
          format: date-time
          type: string
        sequence_number:
          description: Sequence Number
          format: int32
          type: integer
        inconsistent:
          default: false
          description: "If true, the event must be reconciled."
          type: boolean
      required:
        - event_date
        - inconsistent
        - message_type
        - reference_id
        - request_number
        - sequence_number
        - subrequest_number
      type: object
    TesaConnectionEvent:
      example:
        id: 1
        reference_id: reference_id
        request_number: 0
        event_date: 2023-05-31T08:50:40Z
        message_type: message_type
        subrequest_number: 6
      properties:
        id:
          description: Event id
          format: int64
          type: integer
        reference_id:
          description: Request reference id
          type: string
        message_type:
          description: TESA message type
          type: string
        request_number:
          description: TESA request code
          format: int64
          type: integer
        subrequest_number:
          description: TESA subrequest code returned
          format: int64
          type: integer
        event_date:
          description: Event date
          example: 2023-05-31T08:50:40Z
          format: date-time
          type: string
      required:
        - event_date
        - message_type
        - reference_id
        - request_number
        - subrequest_number
      type: object
    TesaIssue:
      example:
        id: 1
        reference_id: 1001
        issue_sequence: 2
        issue_code: I200
        resolved: false
        repeated: false
        last_updated: 2023-05-31T00:00:00.000Z
      properties:
        id:
          description: Id of the issue
          type: integer
          format: int64
        reference_id:
          description: Request reference id
          type: string
        issue_sequence:
          description: Number of issue
          type: integer
          format: int32
        issue_code:
          description: Issue code
          type: string
        resolved:
          description: Issue is resolved or not
          type: boolean
        repeated:
          description: Issue is repeated or not
          type: boolean
        last_updated:
          description: The date of the issue
          example: 2023-05-31T08:50:40Z
          format: date-time
          type: string
      required:
        - id
        - reference_id
        - issue_sequence
        - issue_code
        - resolved
        - last_updated
      type: object
    TesaCustomerContact:
      example:
        phone_number_2: "612345789"
        name: name
        phone_number: "612345789"
        surnames: surnames
        segment: B2C
      properties:
        name:
          description: Contact name
          maxLength: 50
          minLength: 2
          type: string
        surnames:
          description: Contact Surnames
          maxLength: 50
          minLength: 2
          type: string
        phone_number:
          description: Contact phone number
          example: "612345789"
          pattern: "^[6-9]\\d{8}$"
          type: string
        phone_number_2:
          description: Contact phone number 2
          example: "612345789"
          pattern: "^[6-9]\\d{8}$"
          type: string
        segment:
          description: Customer segment
          example: B2C
          type: string
          enum: [ B2C, B2B, B2B2C ]
      required:
        - name
        - phone_number
        - phone_number_2
        - surnames
        - segment
      type: object
    TesaConnection:
      example:
        connection_test: S,
        connection_reuse_indicator: S,
        connection_owner: MM,
        status: READY_TO_CONNECTION_STAMPING,
        create_date: 2024-05-07T15:13:49Z
      properties:
        connection_test:
          description: |
            Connection test:
             * `S` - Final test OK
             * `N` - Final test not done or final test not OK
          maxLength: 1
          minLength: 1
          type: string
        connection_reuse_indicator:
          description: |
            Connection reuse indicator:
             * `S` - Reuse
             * `N` - Not reuse
          maxLength: 1
          minLength: 1
          type: string
        connection_owner:
          description: |
            Connection owner:
             * `TE` - TELEFÓNICA
             * `OR` - ORANGE / JAZZTEL
             * `VD` - VODAFONE / VODAFONE ONO
             * `DI` - DIGI
             * `MM` - MÁSMÓVIL / GRUPO MM
             * `EU` - EUSKALTEL / R-CABLE
          maxLength: 2
          minLength: 2
          type: string
        status:
          $ref: '#/components/schemas/TesaConnectionStatus'
        close_date:
          description: Close date
          example: 2023-05-31T08:50:40Z
          format: date-time
          type: string
        create_date:
          description: Create date
          example: 2023-05-31T08:50:40Z
          format: date-time
          type: string
      required:
        - status
      type: object
    TesaConnectionData:
      example:
        iua: iua,
        province_code: 30,
        town: town,
        address: address,
        splitter_indicator: S,
        splitter_location: RE,
        splitter_detail: splitter_detail,
        cto_type: cto_type,
        cto_location: location,
        cto_location_detail: detail,
        cto_identifier: cto_id,
        cto_port: 111
      properties:
        iua:
          description: Unique access identifier
          maxLength: 12
          type: string
        province_code:
          description: Province code
          maxLength: 2
          minLength: 2
          type: string
        town:
          description: Town
          maxLength: 80
          type: string
        address:
          description: Town
          maxLength: 150
          type: string
        splitter_indicator:
          description: |
            Splitter indicator:
             * `S` - There is a splitter
             * `N` - There is not a splitter
          maxLength: 1
          minLength: 1
          type: string
        splitter_location:
          description: Splitter location
          maxLength: 2
          minLength: 2
          type: string
        splitter_detail:
          description: Splitter detail
          maxLength: 150
          type: string
        cto_type:
          description: CTO type
          maxLength: 40
          type: string
        cto_location:
          description: CTO location
          maxLength: 10
          type: string
        cto_location_detail:
          description: CTO location detail
          maxLength: 35
          type: string
        cto_identifier:
          description: CTO identifier
          maxLength: 6
          type: string
        cto_port:
          description: CTO port
          format: int32
          type: integer
      type: object
    TesaConnectionStatus:
      type: string
      enum:
        - READY_TO_CONNECTION_STAMPING
        - PROCESSING
        - INCIDENCE
        - FINISHED
    TesaTypeEnum:
      type: string
      enum:
        - NEBA
        - VULA
    TesaFaultStatus:
      type: string
      enum:
        - NOT_SENT
        - SENT
        - REJECTED
        - OPENED
        - OPENED_RETRYING
        - OPENED_MODIFYING
        - FRANKED
        - FRANKED_CLOSING
        - FRANKED_REOPENING
        - CLOSED
    TesaFaultContactTime:
      type: object
      required:
        - dayType
        - startAt
        - endAt
      properties:
        dayType:
          type: string
          enum:
            - WEEKDAY
            - SATURDAY
            - HOLIDAY
        startAt:
          type: string
          example: "08:00"
          pattern: '^([01][0-9]|2[0-3]):([0-5][0-9])$'
        endAt:
          type: string
          example: "13:30"
          pattern: '^([01][0-9]|2[0-3]):([0-5][0-9])$'
    TesaFaultLagLinkGroup:
      type: object
      properties:
        linkType:
          type: string
          maxLength: 2
        linkNumber:
          type: string
          maxLength: 20
    TesaFaultTechnicalOperator:
      type: object
      required:
        - name
        - surname1
        - surname2
        - phoneNumber
        - phoneNumber2
        - email
        - email2
        - contactTimes
      properties:
        name:
          type: string
          maxLength: 50
        surname1:
          type: string
          maxLength: 50
        surname2:
          type: string
          maxLength: 50
        phoneNumber:
          type: string
          example: "612345789"
          pattern: "^[6-9]\\d{8}$"
        phoneNumber2:
          type: string
          example: "612345789"
          pattern: "^[6-9]\\d{8}$"
        email:
          type: string
          format: email
          maxLength: 80
        email2:
          type: string
          format: email
          maxLength: 80
        contactTimes:
          type: array
          items:
            $ref: '#/components/schemas/TesaFaultContactTime'
    TesaFaultCustomer:
      type: object
      required:
        - address
        - phoneNumber
        - phoneNumber2
        - contactTimes
      properties:
        name:
          type: string
          maxLength: 50
        surname1:
          type: string
          maxLength: 50
        surname2:
          type: string
          maxLength: 50
        enterpriseName:
          type: string
          maxLength: 140
        address:
          type: string
          maxLength: 250
        phoneNumber:
          type: string
          example: "612345789"
          pattern: "^[6-9]\\d{8}$"
        phoneNumber2:
          type: string
          example: "612345789"
          pattern: "^[6-9]\\d{8}$"
        contactTimes:
          type: array
          items:
            $ref: '#/components/schemas/TesaFaultContactTime'
    TesaFaultSynchronyTest:
      type: object
      required:
        - syncTested
      properties:
        syncTested:
          type: string
          description: |
            Has tested synchrony:
             * `S` - Yes
             * `N` - No
          enum:
            - S
            - N
        maxSpeed:
          type: string
          maxLength: 15
        attenuation:
          type: string
          maxLength: 15
        noiseMargin:
          type: string
          maxLength: 15
    TesaFaultUserTest:
      type: object
      required:
        - customerContacted
        - equipmentReset
        - equipmentChanged
      properties:
        customerContacted:
          type: string
          description: |
            Has the customer been contacted:
             * `S` - Yes
             * `N` - No
          enum:
            - S
            - N
        equipmentReset:
          type: string
          description: |
            Has reset the equipment:
             * `S` - Yes
             * `N` - No
          enum:
            - S
            - N
        equipmentChanged:
          type: string
          description: |
            Has the equipment been changed:
             * `S` - Yes
             * `N` - No
          enum:
            - S
            - N
        toneTested:
          type: string
          description: |
            Has tested the tone:
             * `S` - Yes
             * `N` - No
          enum:
            - S
            - N
        opticPowerTested:
          type: string
          description: |
            Has tested optic power:
             * `S` - Yes
             * `N` - No
          enum:
            - S
            - N
        syncInPtr:
          type: string
          description: |
            Has sync in PTR:
             * `S` - Yes
             * `N` - No
          enum:
            - S
            - N
        routerTested:
          type: string
          description: |
            Has tested the router:
             * `S` - Yes
             * `N` - No
          enum:
            - S
            - N
        ontTested:
          type: string
          description: |
            Has tested the ONT:
             * `S` - Yes
             * `N` - No
          enum:
            - S
            - N
    TesaFaultScheduledCoordinatedTest:
      type: object
      required:
        - scheduledDate
        - technicianName
        - technicianSurname1
        - technicianSurname2
        - technicianLandline
        - technicianMobile
        - email
        - testLocation
      properties:
        scheduledDate:
          type: string
          description: Date of the scheduled test
          example: 2023-05-31T08:50:40Z
          format: date-time
        technicianName:
          type: string
          maxLength: 50
        technicianSurname1:
          type: string
          maxLength: 50
        technicianSurname2:
          type: string
          maxLength: 50
        technicianLandline:
          type: string
          example: "612345789"
          pattern: "^[6-9]\\d{8}$"
        technicianMobile:
          type: string
          example: "612345789"
          pattern: "^[6-9]\\d{8}$"
        email:
          type: string
          format: email
          maxLength: 80
        testLocation:
          type: string
          maxLength: 2
    TesaFaultNonScheduledCoordinatedTest:
      type: object
      required:
        - phoneNumber
        - testLocation
        - contactTimes
      properties:
        phoneNumber:
          type: string
          example: "612345789"
          pattern: "^[6-9]\\d{8}$"
        testLocation:
          type: string
          maxLength: 2
        contactTimes:
          type: array
          items:
            $ref: '#/components/schemas/TesaFaultContactTime'
    TesaFaultEvent:
      type: object
      required:
        - eventDate
        - status
      properties:
        eventDate:
          type: string
          example: 2023-05-31T08:50:40Z
          format: date-time
        status:
          $ref: '#/components/schemas/TesaFaultStatus'
        causeStatus:
          type: string
          maxLength: 255
        clockStatus:
          type: string
          description: Current clock status
          maxLength: 1
        observations:
          type: string
          maxLength: 1000
    TesaFaultResponse:
      type: object
      required:
        - referenceId
        - externalReference
        - tenant
        - status
        - faultDate
        - affectedService
        - commercialNumberType
        - commercialNumber
        - symptom
        - qosAffected
        - cutFrequency
        - cutDuration
        - diagnosisObservations
        - workingPreviously
        - testType
        - technicalOperator
        - type
      properties:
        referenceId:
          type: string
          description: Operator id reference
          maxLength: 30
        externalReference:
          type: string
          description: External reference
          maxLength: 255
        faultNumber:
          type: integer
          description: Fault id returned by TESA
          format: int64
        tenant:
          type: string
          description: Tenant in lower case
          maxLength: 50
        status:
          $ref: '#/components/schemas/TesaFaultStatus'
        causeStatus:
          type: string
          description: Cause of the current status
          maxLength: 255
        clockStatus:
          type: string
          description: Current clock status
          maxLength: 1
        faultDate:
          type: string
          description: Date of the detection
          example: 2023-05-31T08:50:40Z
          format: date-time
        expectedFixedDate:
          type: string
          description: Expected date of the fix
          example: 2023-05-31T08:50:40Z
          format: date-time
        affectedService:
          type: string
          description: Type of the service that was affected
          maxLength: 8
        commercialNumberType:
          type: string
          maxLength: 2
        commercialNumber:
          type: string
          maxLength: 20
        symptom:
          type: string
          maxLength: 4
        ipAddress:
          type: string
          maxLength: 40
        migaCode:
          type: integer
          format: int64
        networkElement:
          type: string
          maxLength: 100
        signalType:
          type: string
          maxLength: 6
        qosAffected:
          type: string
          maxLength: 2
        cutFrequency:
          type: string
          maxLength: 2
        cutDuration:
          type: string
          maxLength: 2
        diagnosisObservations:
          type: string
          maxLength: 2000
        workingPreviously:
          type: string
          description: |
            Has been working previously:
             * `S` - Yes
             * `N` - No
          enum:
            - S
            - N
        testType:
          type: string
          maxLength: 2
        disagreementCode:
          type: string
          maxLength: 2
        responsible:
          type: string
          maxLength: 1
        cause:
          type: string
          maxLength: 4
        location:
          type: string
          maxLength: 4
        observations:
          type: string
          maxLength: 1000
        type:
          $ref: '#/components/schemas/TesaTypeEnum'
        technicalOperator:
          $ref: '#/components/schemas/TesaFaultTechnicalOperator'
        customer:
          $ref: '#/components/schemas/TesaFaultCustomer'
        lagLinkGroups:
          type: array
          items:
            $ref: '#/components/schemas/TesaFaultLagLinkGroup'
        synchronyTest:
          $ref: '#/components/schemas/TesaFaultSynchronyTest'
        userTest:
          $ref: '#/components/schemas/TesaFaultUserTest'
        scheduledCoordinatedTest:
          $ref: '#/components/schemas/TesaFaultScheduledCoordinatedTest'
        nonScheduledCoordinatedTest:
          $ref: '#/components/schemas/TesaFaultNonScheduledCoordinatedTest'
        events:
          type: array
          items:
            $ref: '#/components/schemas/TesaFaultEvent'
        closeDate:
          type: string
          description: Close date
          format: date-time
          example: "2023-05-31T08:50:40Z"
        createDate:
          type: string
          description: Create date
          format: date-time
          example: "2023-05-31T08:50:40Z"
        updateDate:
          type: string
          description: Update date
          format: date-time
          example: "2023-05-31T08:50:40Z"
    TesaCreateFaultRequest:
      type: object
      required:
        - externalReference
        - faultDate
        - affectedService
        - commercialNumberType
        - commercialNumber
        - symptom
        - migaCode
        - qosAffected
        - cutFrequency
        - cutDuration
        - diagnosisObservations
        - workingPreviously
        - testType
        - technicalOperator
        - type
      properties:
        externalReference:
          type: string
          description: External reference
          maxLength: 255
        faultDate:
          type: string
          description: Date of the detection
          example: 2023-05-31T08:50:40Z
          format: date-time
        affectedService:
          type: string
          description: Type of the service that was affected
          maxLength: 8
        commercialNumberType:
          type: string
          maxLength: 2
        commercialNumber:
          type: string
          maxLength: 20
        symptom:
          type: string
          maxLength: 4
        ipAddress:
          type: string
          maxLength: 40
        migaCode:
          type: integer
          format: int64
          default: 2810001
        networkElement:
          type: string
          maxLength: 100
        signalType:
          type: string
          maxLength: 6
        qosAffected:
          type: string
          maxLength: 2
        cutFrequency:
          type: string
          maxLength: 2
        cutDuration:
          type: string
          maxLength: 2
        diagnosisObservations:
          type: string
          maxLength: 2000
        workingPreviously:
          type: string
          description: |
            Has been working previously:
             * `S` - Yes
             * `N` - No
          enum:
            - S
            - N
        testType:
          type: string
          maxLength: 2
        observations:
          type: string
          maxLength: 1000
        type:
          $ref: '#/components/schemas/TesaTypeEnum'
        technicalOperator:
          $ref: '#/components/schemas/TesaFaultTechnicalOperator'
        customer:
          $ref: '#/components/schemas/TesaFaultCustomer'
        lagLinkGroups:
          type: array
          items:
            $ref: '#/components/schemas/TesaFaultLagLinkGroup'
        synchronyTest:
          $ref: '#/components/schemas/TesaFaultSynchronyTest'
        userTest:
          $ref: '#/components/schemas/TesaFaultUserTest'
        scheduledCoordinatedTest:
          $ref: '#/components/schemas/TesaFaultScheduledCoordinatedTest'
        nonScheduledCoordinatedTest:
          $ref: '#/components/schemas/TesaFaultNonScheduledCoordinatedTest'
    TesaModifyFaultRequest:
      type: object
      required:
        - externalReference
      properties:
        externalReference:
          type: string
          description: External reference
          maxLength: 255
        customer:
          $ref: '#/components/schemas/TesaFaultCustomer'
        lagLinkGroups:
          type: array
          items:
            $ref: '#/components/schemas/TesaFaultLagLinkGroup'
        ipAddress:
          type: string
          maxLength: 40
        networkElement:
          type: string
          maxLength: 100
        scheduledCoordinatedTest:
          $ref: '#/components/schemas/TesaFaultScheduledCoordinatedTest'
        nonScheduledCoordinatedTest:
          $ref: '#/components/schemas/TesaFaultNonScheduledCoordinatedTest'
        observations:
          type: string
          maxLength: 1000
    TesaCloseFaultRequest:
      type: object
      required:
        - externalReference
        - disagreementCode
      properties:
        externalReference:
          type: string
          description: External reference
          maxLength: 255
        disagreementCode:
          type: string
          maxLength: 2
    TesaAttachFaultFileRequest:
      type: object
      required:
        - externalReference
        - fileName
        - fileDescription
        - fileContent
      properties:
        externalReference:
          type: string
          description: External reference of the fault to attach the file to
        fileName:
          type: string
          description: Name of the file being attached
          maxLength: 100
        fileDescription:
          type: string
          description: Description of the file
          maxLength: 200
        fileContent:
          type: string
          description: Base64 encoded file content
          maxLength: 6291456
    TesaRetryFaultRequest:
      type: object
      required:
        - externalReference
      properties:
        externalReference:
          type: string
          description: External reference of the fault to retry
          maxLength: 255
        reason:
          type: string
          description: Reason for retrying the fault (optional)
          maxLength: 1000
    TesaReopenFaultRequest:
      type: object
      required:
        - externalReference
        - reason
      properties:
        externalReference:
          type: string
          description: External reference of the fault to reopen
          maxLength: 255
        reason:
          type: string
          description: Reason for reopening the fault
          maxLength: 1000
        scheduledCoordinatedTest:
          $ref: '#/components/schemas/TesaFaultScheduledCoordinatedTest'
        nonScheduledCoordinatedTest:
          $ref: '#/components/schemas/TesaFaultNonScheduledCoordinatedTest'

    MobileActivateRequest:
      type: object
      required:
        - externalReference
        - billingType
        - msisdn
        - segment
      additionalProperties: false
      properties:
        externalReference:
          type: string
          description: External reference assigned to process
          example: 'process-01'
        segment:
          type: string
          enum: [ 'B2C', 'B2B', 'B2B2C' ]
          description: Client segment
          example: 'B2C'
        billingType:
          type: string
          enum: [ 'POSTPAID', 'PREPAID' ]
          description: Billing type
          example: 'POSTPAID'
        msisdn:
          type: object
          required:
            - countryCode
            - number
          additionalProperties: false
          properties:
            countryCode:
              type: string
              pattern: "^\\d{1,3}$"
              description: Country code
              example: "34"
            number:
              type: string
              pattern: "^\\d{4,14}$"
              description: Msisdn
              example: "675588933"
        sim:
          type: object
          description: Sim characteristics
          required:
            - imsi
          properties:
            iccid:
              type: string
              description: Integrated Circuit Card Identifier
              example: '8934333324100119000'
            imsi:
              type: string
              description: International Mobile Subscriber Identity
              example: '214111128354000'
            ki:
              type: string
              description: Authentication key
              example: 'X11352C34E2881C51CDB15FA7CD64ASD'
              nullable: true
        network:
          type: object
          description: Network characteristics
          required:
            - dataPlan
            - serviceClass
          properties:
            dataPlan:
              type: string
              example: 'INFINITA2'
            serviceClass:
              type: string
              example: '0'
            profileId:
              type: string
              example: '51'
        portability:
          type: object
          description: Portability characteristics
          required:
            - contractCode
            - cutOverWindow
            - donor
          additionalProperties: false
          properties:
            contractCode:
              type: string
              example: '00523826771'
            cutOverWindow:
              type: string
              example: '2025-04-29'
            donor:
              type: object
              description: Portability donor characteristics
              required:
                - documentType
                - documentNumber
                - operator
              properties:
                documentType:
                  type: string
                  example: 'DNI'
                  description: Portability donor document type
                documentNumber:
                  type: string
                  example: '70011111X'
                  description: Portability donor document number
                nationality:
                  type: string
                  example: 'Spanish'
                  description: Portability donor nationality
                name:
                  type: string
                  example: 'Eduardo'
                  description: Portability donor name
                middleName:
                  type: string
                  example: 'Invent'
                  description: Portability donor middle name
                lastName:
                  type: string
                  example: 'Total'
                  description: Portability donor last name
                enterprise:
                  type: string
                  example: 'MASORANGE S.L.'
                  description: Portability donor enterprise
                operator:
                  type: string
                  example: '0031'
                  description: Portability donor operator
                iccid:
                  type: string
                  example: '8934011119120320000'
                  description: Portability donor Integrated Circuit Card Identifier
              oneOf:
                - required: [ name, middleName, lastName ]
                - required: [ enterprise ]
              additionalProperties: false
        language:
          type: string
          enum: [ 'es', 'ca', 'gl', 'eu', 'en' ]
          description: Language
          example: "es"

    MobileTerminateRequest:
      type: object
      required:
        - externalReference
        - billingType
        - msisdn
        - segment
      additionalProperties: false
      properties:
        externalReference:
          type: string
          description: External reference assigned to process
          example: 'process-01'
        segment:
          type: string
          enum: [ 'B2C', 'B2B', 'B2B2C' ]
          description: Client segment
          example: 'B2C'
        billingType:
          type: string
          enum: [ 'POSTPAID', 'PREPAID' ]
          description: Billing type
          example: 'POSTPAID'
        msisdn:
          type: object
          additionalProperties: false
          required:
            - countryCode
            - number
          properties:
            countryCode:
              type: string
              pattern: "^\\d{1,3}$"
              description: Country code
              example: "34"
            number:
              type: string
              pattern: "^\\d{4,14}$"
              description: Msisdn
              example: "675588933"
        sim:
          type: object
          description: Sim characteristics
          required:
            - imsi
          properties:
            iccid:
              type: string
              description: Integrated Circuit Card Identifier
              example: '8934333324100119000'
            imsi:
              type: string
              description: International Mobile Subscriber Identity
              example: '214111128354000'
            ki:
              type: string
              description: Authentication key
              example: 'X11352C34E2881C51CDB15FA7CD64ASD'
              nullable: true
        portability:
          type: object
          description: Portability characteristics
          required:
            - portabilityDate
            - receptorOperator
            - donor
          additionalProperties: false
          properties:
            portabilityDate:
              type: string
              description: "The requested date and time for the portability (e.g., MM/dd/yy/HH/mm)."
              pattern: '^(0[1-9]|1[0-2])/(0[1-9]|[12][0-9]|3[01])/\d{2}/([01][0-9]|2[0-3])/([0-5][0-9])$'
              example: 12/17/24/02/00
            receptorOperator:
              type: string
              example: 001
            donor:
              type: object
              description: Portability donor characteristics
              required:
                - operator
              additionalProperties: false
              properties:
                operator:
                  type: string
                  example: '0031'
                  description: Portability donor operator

    MobileChangeTariffRequest:
      type: object
      required:
        - externalReference
        - segment
        - billingType
        - msisdn
        - sim
        - oldCommercialProductId
        - newCommercialProductId
      properties:
        externalReference:
          type: string
          description: External reference assigned to process
          example: 'process-01'
        segment:
          type: string
          enum: [ 'B2C', 'B2B', 'B2B2C' ]
          description: Client segment
          example: 'B2C'
        billingType:
          type: string
          enum: [ 'POSTPAID', 'PREPAID' ]
          description: Billing type
          example: 'POSTPAID'
        msisdn:
          type: object
          additionalProperties: false
          properties:
            countryCode:
              type: string
              pattern: "^\\d{1,3}$"
              description: Country code
              example: "34"
        sim:
          type: object
          description: Sim characteristics
          required:
            - imsi
          properties:
            iccid:
              type: string
              description: Integrated Circuit Card Identifier
              example: '8934333324100119000'
            imsi:
              type: string
              description: International Mobile Subscriber Identity
              example: '214111128354000'
            ki:
              type: string
              description: Authentication key
              example: 'X11352C34E2881C51CDB15FA7CD64ASD'
        client:
          type: object
          properties:
            email:
              type: string
              description: Client email
              example: 'invent@masorange.lol'
            documentNumber:
              type: string
              description: Client document number
              example: '70002222X'
            firstName:
              type: string
              description: Client first name
              example: 'Eduardo'
            lastName:
              type: string
              description: Client last name
              example: 'Invent'
            phoneNumber:
              type: string
              description: Client phone number
              example: '675588933'
        oldCommercialProductId:
          type: string
          description: Old commercial tariff
          example: 'YG_TARIFF_30GB_3'
        newCommercialProductId:
          type: string
          description: New commercial tariff
          example: 'YG_TARIFF_35GB_3'

    MobileChangeSimRequest:
      type: object
      required:
        - externalReference
        - segment
        - billingType
        - msisdn
        - sim
      additionalProperties: false
      properties:
        externalReference:
          type: string
          description: External reference assigned to process
          example: 'process-01'
        segment:
          type: string
          enum: [ 'B2C', 'B2B', 'B2B2C' ]
          description: Client segment
          example: 'B2C'
        billingType:
          type: string
          enum: [ 'POSTPAID', 'PREPAID' ]
          description: Billing type
          example: 'POSTPAID'
        msisdn:
          type: object
          additionalProperties: false
          properties:
            countryCode:
              type: string
              pattern: "^\\d{1,3}$"
              description: Country code
              example: "34"
        sim:
          type: object
          properties:
            in:
              type: object
              required:
                - imsi
              properties:
                iccid:
                  type: string
                  description: Integrated Circuit Card Identifier
                  example: '8934333324100119000'
                imsi:
                  type: string
                  description: International Mobile Subscriber Identity
                  example: '214111128354000'
                ki:
                  type: string
                  description: Authentication key
                  example: 'X11352C34E2881C51CDB15FA7CD64ASD'
            out:
              type: object
              required:
                - imsi
              properties:
                iccid:
                  type: string
                  description: Integrated Circuit Card Identifier
                  example: '8934333324100119001'
                imsi:
                  type: string
                  description: International Mobile Subscriber Identity
                  example: '214111128354001'
                ki:
                  type: string
                  description: Authentication key
                  example: 'X11352C34E2881C51CDB15FA7CD64ASX'

    MobileChangeMultiSimRequest:
      type: object
      required:
        - externalReference
        - segment
        - billingType
        - msisdn
        - sim
        - multiSimInfo
      additionalProperties: false
      properties:
        externalReference:
          type: string
          description: External reference assigned to process
          example: 'process-01'
        segment:
          type: string
          enum: [ 'B2C', 'B2B', 'B2B2C' ]
          description: Client segment
          example: 'B2C'
        billingType:
          type: string
          enum: [ 'POSTPAID', 'PREPAID' ]
          description: Billing type
          example: 'POSTPAID'
        msisdn:
          type: object
          additionalProperties: false
          properties:
            countryCode:
              type: string
              pattern: "^\\d{1,3}$"
              description: Country code
              example: "34"
        sim:
          type: object
          properties:
            in:
              type: object
              required:
                - imsi
              properties:
                iccid:
                  type: string
                  description: Integrated Circuit Card Identifier
                  example: '8934333324100119000'
                imsi:
                  type: string
                  description: International Mobile Subscriber Identity
                  example: '214111128354000'
                ki:
                  type: string
                  description: Authentication key
                  example: 'X11352C34E2881C51CDB15FA7CD64ASD'
            out:
              type: object
              required:
                - imsi
              properties:
                iccid:
                  type: string
                  description: Integrated Circuit Card Identifier
                  example: '8934333324100119001'
                imsi:
                  type: string
                  description: International Mobile Subscriber Identity
                  example: '214111128354001'
                ki:
                  type: string
                  description: Authentication key
                  example: 'X11352C34E2881C51CDB15FA7CD64ASX'
        multiSimInfo:
          type: object
          nullable: true
          properties:
            primaryImsi:
              type: string
              description: Primary IMSI associated with the multi-sim
              example: '214111128354002'
            primaryMsisdn:
              description: Primary MSISDN associated with the multi-sim
              type: object
              required:
                - countryCode
                - number
              additionalProperties: false
              properties:
                countryCode:
                  type: string
                  pattern: "^\\d{1,3}$"
                  description: Country code
                  example: "34"
                number:
                  type: string
                  pattern: "^\\d{4,14}$"
                  description: Msisdn
                  example: "675588933"

    MobileChangeCallWaitingRequest:
      type: object
      required:
        - externalReference
        - segment
        - billingType
        - msisdn
        - sim
        - callWaitingService
      properties:
        externalReference:
          type: string
          description: External reference assigned to process
          example: 'process-01'
        segment:
          type: string
          enum: [ 'B2C', 'B2B', 'B2B2C' ]
          description: Client segment
          example: 'B2C'
        billingType:
          type: string
          enum: [ 'POSTPAID', 'PREPAID' ]
          description: Billing type
          example: 'POSTPAID'
        msisdn:
          type: object
          additionalProperties: false
          properties:
            countryCode:
              type: string
              pattern: "^\\d{1,3}$"
              description: Country code
              example: "34"
        sim:
          type: object
          required:
            - imsi
          properties:
            iccid:
              type: string
              description: Integrated Circuit Card Identifier
              example: '8934333324100119000'
            imsi:
              type: string
              description: International Mobile Subscriber Identity
              example: '214111128354000'
            ki:
              type: string
              description: Authentication key
              example: 'X11352C34E2881C51CDB15FA7CD64ASD'
              nullable: true
        callWaitingService:
          type: boolean
          description: Indicates if the call waiting service is active
          example: true

    MobileChangeCallForwardingRequest:
      type: object
      required:
        - externalReference
        - segment
        - billingType
        - msisdn
        - sim
      properties:
        externalReference:
          type: string
          description: External reference assigned to process
          example: 'process-01'
        segment:
          type: string
          enum: [ 'B2C', 'B2B', 'B2B2C' ]
          description: Client segment
          example: 'B2C'
        billingType:
          type: string
          enum: [ 'POSTPAID', 'PREPAID' ]
          description: Billing type
          example: 'POSTPAID'
        msisdn:
          type: object
          additionalProperties: false
          properties:
            countryCode:
              type: string
              pattern: "^\\d{1,3}$"
              description: Country code
              example: "34"
        sim:
          type: object
          required:
            - imsi
          properties:
            imsi:
              type: string
              description: International Mobile Subscriber Identity
              example: '214111128354000'
            ki:
              type: string
              description: Authentication key
              example: 'X11352C34E2881C51CDB15FA7CD64ASD'
              nullable: true
        callForwardServices:
          type: array
          description: List of call forwarding services configured
          items:
            type: object
            properties:
              type:
                type: string
                description: Type of call forwarding
                example: 'callForwardBusy'
              value:
                type: string
                description: Value of service
                example: '34633633556'

    MobileChangeBarringsRequest:
      type: object
      required:
        - externalReference
        - segment
        - billingType
        - msisdn
        - sim
      properties:
        externalReference:
          type: string
          description: Identificador externo de la solicitud
          example: DISCONNECT_TEST_KENNY_406130_722608064
        segment:
          type: string
          enum: [ 'B2C', 'B2B', 'B2B2C' ]
        billingType:
          type: string
          description: Tipo de cliente asociado a la SIM
          enum: [ 'POSTPAID', 'PREPAID' ]
          example: POSTPAID
        msisdn:
          type: object
          additionalProperties: false
          properties:
            countryCode:
              type: string
              pattern: "^\\d{1,3}$"
              description: Country code
              example: "34"
        sim:
          type: object
          required:
            - imsi
          properties:
            imsi:
              type: string
              description: Identidad internacional del abonado móvil (IMSI)
              example: 214040126049981
            ki:
              type: string
              description: (Ki)
              example: 48DF770F8363A0EE5FEB620B6F3ACBF3
        changeBarringServices:
          type: array
          description: Lista de barrings configurados
          items:
            type: object
            properties:
              type:
                type: string
                description: Tipo del Barrings (por ejemplo, callForwardBusy o callForwardUnconditional)
                example: callForwardBusy
              value:
                type: string
                description: Valor del servicio (por ejemplo, el número al que se desvía la llamada)
                example: "+123456789"

    MobileProcessResponse:
      type: object
      properties:
        message:
          type: string
          example: message
        processId:
          type: string
          example: processId
      description: Rest service success process response

    MobileSuccessResponse:
      type: object
      properties:
        message:
          type: string
          example: message
      description: Rest service success response

    MobileErrorResponse:
      required:
        - code
        - title
      type: object
      properties:
        code:
          type: string
          description: Error code string for fast identification
          example: INVALID_MSISDN
        title:
          type: string
          description: Message description or detail of error
          example: 'MSISDN does not belong to an active service'
      description: Rest service error response

    AgileAddressResult:
      type: object
      properties:
        service_id:
          type: string
          description: Broadband subscription identifier.
          example: "ACC_123456"
        installation_address:
          $ref: '#/components/schemas/AgileInstallationAddress'

    AgileInstallationAddress:
      type: object
      properties:
        street_type:
          type: string
          example: "Street"
        street_name:
          type: string
          example: "Tellez"
        house_number:
          type: string
          example: "12"
        additional_info:
          type: string
          example: "Door 3C"
        city:
          type: string
          example: "Riaza"
        province:
          type: string
          example: "Segovia"
        country:
          type: string
          example: "es"
        post_code:
          type: string
          example: "40500"

  parameters:
    OrgId:
      in: path
      name: org_id
      description: Tenant
      required: true
      schema:
        type: string
      example: masmovil
    Org:
      in: path
      name: org
      description: Tenant
      required: true
      schema:
        type: string
      example: pepephone

    Request-Correlation-Id:
      in: header
      name: Request-Correlation-Id
      description: A reference for this transaction that can be used to track it.
      required: true
      schema:
        type: string
      example: Workflow Id (unique identifier)
    RequestCorrelationId:
      in: header
      name: Request-Correlation-Id
      description: A reference for this transaction that can be used to track it.
      required: true
      schema:
        type: string
      example: Workflow Id (unique identifier)
    Request-Correlation-Id-Response:
      in: header
      name: Request-Correlation-Id-Response
      required: false
      schema:
        type: string
      description: Workflow Id (unique identifier)

    AmazonBundleId:
      in: path
      name: bundle_id
      description: Bundle identifier
      required: true
      schema:
        type: string
      example: 95e3e1a2-e09b-4d2d-b35a-6a0845b1170b
    AmazonSubscriptionId:
      in: path
      name: subscription_id
      description: Subscription identifier.
      required: true
      schema:
        type: string
      example: 1982io-e112-9002-123029-tr4006f919aa

    NetflixEventsQueryEndTimestamp:
      in: query
      name: endTimestamp
      description: A timestamp (specified in UNIX epoch seconds) to filter the events that have occurred before a specific time. Value must be greater than startTimestamp and at least 15 minutes before the current time.
      required: true
      schema:
        type: integer
        format: int64
      example: 1683796942
    NetflixEventsQueryEventTypes:
      in: query
      name: events
      description: A case-sensitive comma-separated list of event types. The values must match the SubscriptionEventType values. Used to retrieve events of specific type(s) that have occurred during the time period defined by startTimestamp and endTimestamp. If this parameter is not provided, it defaults to returning all types of events.
      required: false
      schema:
        type: array
        items:
          $ref: '#/components/schemas/NetflixSubscriptionEventType'
      style: form
      explode: true
      example: BUNDLE_ACTIVATION,BUNDLE_PLAN_CHANGE
    NetflixEventsQueryStartTimestamp:
      in: query
      name: startTimestamp
      description: A timestamp (specified in UNIX epoch seconds) to filter the events that have occurred on or after a specific time. Value must be within 14 days of the current time.
      required: true
      schema:
        type: integer
        format: int64
      example: 1683710542
    NetflixEventsQueryOffset:
      in: query
      name: offset
      description: Used when retrieving subsequent pages of events that have occurred during the time period defined by startTimestamp and endTimestamp. Must be set to the value provided for the next_page_offset field of the previous response for the same time period. Do not build any logic or validation around this value.
      required: false
      schema:
        type: integer
        format: int64
      example: 10
    NetflixSubscriptionId:
      in: path
      name: subscription_id
      description: Subscription identifier. Corresponds to the Partner Account Identifier (PAI).
      required: true
      schema:
        type: string
      example: 4567890123456789

    HboSubscriptionId:
      in: path
      name: subscription_id
      description: Subscription identifier. Corresponds to the Service Id in HBO.
      required: true
      schema:
        type: string
      example: 4567890123456789

    SubscriptionExternalId:
      in: path
      name: subscriptionExternalId
      description: Partner user identifier in OrangeTV. It's the Id in CRM.
      required: true
      schema:
        type: string
      example: 913259067
    CustomerExternalId:
      in: path
      name: customerExternalId
      description: Partner user identifier in OrangeTV. It's the Id in CRM.
      required: true
      schema:
        type: string
      example: 913259067
    SerialNumber:
      in: path
      name: serialNumber
      description: device serial number
      required: true
      schema:
        type: string
      example: 123123123
    Experience:
      in: query
      name: experience
      required: false
      description: Tv flavour
      schema:
        type: string
      example: VuelaTV

    TesaPersistenceTypeParameter:
      description: Persistence Type
      name: persistence_type
      explode: false
      in: query
      style: form
      schema:
        $ref: '#/components/schemas/TesaPersistenceType'
    TesaReferenceId:
      description: The id of the request to retrieve issues for
      name: reference_id
      explode: false
      in: path
      style: simple
      required: true
      schema:
        maxLength: 21
        type: string