---
openapi: 3.0.0
info:
  version: 3.9.3
  title: 'Enterprise Management API'
  description: |

    #### Copyright
    © Aeris Communications, Inc. 2026. All rights reserved. No part of this document may be reproduced in any form without the written permission of the copyright owner.

    #### Disclaimer

    The contents of this document are subject to revision without notice due to continued progress in methodology, design and manufacturing.
    Aeris shall have no liability for any error or damage of any kind resulting from the use of this document.

    #### Trademark List

    All trademarks mentioned herein are the property of their respective owners.
    These are shown in the document Trademark Information.

    # Introduction

     This API provides a resource for getting information about
     enterprises and managing them.

     This API is rate-limited, exact limits
     are available in response message headers.

     # Important

     API audience must be prepared for compatible API extensions:

     - Be tolerant with
     unknown fields in the payload (see also Fowler’s \"TolerantReader\" post),
     i.e. ignore new fields but do not eliminate them from payload if needed
     for subsequent PUT requests.
     - Be prepared that \"x-extensible-enum\"
     return parameter may deliver new values. Either be agnostic or provide
     default behavior for unknown values.
     - Be prepared to handle HTTP status
     codes not explicitly specified in endpoint definitions.
     - Follow the
     redirect when the server returns HTTP status 301 Moved Permanently.

     # Deprecation

     API deprecation will be reflected in the OpenAPI definition.
     If a method on a path, a whole path or even a whole API endpoint
     (multiple paths) should be deprecated, they will be marked as deprecated.
     During deprecation phase, a Warning header (see RFC 7234 - Warning header)
     field will be added in the response. The warn-code will be 299 and the
     warn-text will inform about what is deprecated and when it will be
     completely removed.

     API audience should not start using a deprecated
     API.

     API audience is encouraged to monitor for Warning header.

    ## Scope

    This document covers the following topics:

    — An overview of the API

    — A detailed description of all operations offered by the API

    ## Prerequisites
    In this document, it is assumed that the user is familiar with the following:

    — Java Script Object Notation (JSON)

    — Basic understanding of REST web services

    — The [OpenAPI Initiative](https://www.openapis.org/) for the standardized format used in this document.

    ## Related Information
    The definition and explanation of acronyms and terminology and typographic conventions can be found in the following documents:

    — IoTA Glossary of Terms and Acronyms

    — Typographic Conventions

    # General API Guidelines

    ## Compatibility

    API audience must be prepared for compatible API extensions:

    - Be tolerant with unknown fields in the payload (see also Fowler’s "TolerantReader" post), i.e. ignore new fields but do not eliminate them from payload if needed for subsequent PUT requests.
    - Be prepared that "x-extensible-enum" return parameter may deliver new values. Either be agnostic or provide default behavior for unknown values.
    - Be prepared to handle HTTP status codes not explicitly specified in endpoint definitions.
    - Follow the redirect when the server returns HTTP status 301 Moved Permanently.

    ## Security

    This section describes the security measures in the API. Security measures include authentication, authorization, and encryption.

    ### Authentication and Authorization

    The API uses OAuth2 and OpenID Connect (OIDC) for authentication and authorization.

    All API endpoints require authentication, which is performed by passing a token in the Authorization header in each request, preceded by the word Bearer and a space. See the following example:
    ```
    curl -i -X GET "https://<baseURL>/iot/api/x-entities" -H "Content-Type: application/json" -H "Authorization: Bearer <TOKEN_GOES_HERE>"
    ```
    To fetch the token using e.g. curl, submit the following:
    ```
    curl -X POST "https://<baseURL>/iot/api/auth/token" -H "Accept: application/vnd.dcp-v1+json" -H "Content-Type: application/x-www-form-urlencoded" -d "grant_type=password&client_id=<client_id>&username=<username>&password=<password>"
    ```
    ### Encryption

    All API requests are encrypted using the HTTPS protocol to grant secure data transfer.

    ### Permission
    API permissions are authorized by authorization server based on the account roles. Required permissions for this API are documented in 'securitySchemes' section.
    You can view available permissions for your account through permission library in Service Portal by navigating Administration > Users & roles > Permission library > <PERMISSION_NAME>
    or Role administration > Actions > View permission library.

    Make sure permissions <PERMISSION_NAME> are available to your account before you start utilizing this API.

    
    ## Deprecation

    API deprecation will be reflected in the OpenAPI definition. If a method on a path, a whole path or even a whole API endpoint (multiple paths) should be deprecated, they will be marked as deprecated.
    During deprecation phase, a Deprecation header and a Sunset header fields will be added in the response.

    Example:
    ```
    Deprecation: Tue, 31 Dec 2024 23:59:59 GMT
    Sunset: Wed, 31 Dec 2025 23:59:59 GMT
    ```

    API audience should not start using a deprecated API.

    API audience is encouraged to monitor for Deprecation and Sunset header.

  contact:
    name: 'Aeris IoT SaaS'
    url: 'https://support.aeris.net/hc/en-us'
  x-audience: external-partner
  x-api-id: 30a38694-63dc-4fbd-8bed-5b8ffdfe0e19
servers:
  - url: 'https://iot-api.aeris.com/iot/api/ecm'
    description: 'Main API server'
paths:
  '/enterprises':
    get:
      tags:
        - Enterprise
      summary: 'List enterprises.'
      description: 'Lists all my enterprises.'
      operationId: getEnterprises
      parameters:
        - $ref: '#/components/parameters/tagsParam'
        - $ref: '#/components/parameters/pageNumber'
        - $ref: '#/components/parameters/size'
        - $ref: '#/components/parameters/template_sp_id'
      responses:
        '200':
          description: OK
          allOf:
            - $ref: '#/components/responses/RateLimitedResponse'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnterprisesRead'
            application/json;version=2.0.0:
              schema:
                $ref: '#/components/schemas/EnterprisesRead'
        '429':
          $ref: '#/components/responses/429'
        default:
          description: 'The standard http error codes will be given. 4XX for client errors and 5XX for server errors.'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
      security:
        - oauth2:
            - css_manage_enterprise_hierarchy
    post:
      tags:
        - Enterprise
      summary: 'Create a new enterprise.'
      description: "Creates a new enterprise. Please note: after successful creation, the enterprise needs to be provisioned by setting the enterprise status to ''READY'' with [POST/enterprises/{enterprise_id}/statuses]()"
      operationId: createEnterprise
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EnterpriseCreate'
      responses:
        '201':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Empty'
            application/json;version=2.0.0:
              schema:
                $ref: '#/components/schemas/Empty'
          allOf:
            - $ref: '#/components/responses/RateLimitedResponse'
        '429':
          $ref: '#/components/responses/429'
        default:
          description: 'The standard http error codes will be given.
            4XX for client errors and 5XX for server errors.'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
      security:
        - oauth2:
            - css_manage_enterprise_hierarchy
  '/enterprises/{enterprise_id}':
    get:
      tags:
        - Enterprise
      summary: 'Get details of an enterprise.'
      operationId: getEnterpriseDetails
      parameters:
        - $ref: '#/components/parameters/enterpriseIdParam'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnterpriseDetail'
            application/json;version=2.0.0:
              schema:
                $ref: '#/components/schemas/EnterpriseDetail'
          allOf:
            - $ref: '#/components/responses/RateLimitedResponse'
        '429':
          $ref: '#/components/responses/429'
        default:
          description: 'The standard http error codes will be given.
            Usually 400,403,401,404 or 500.'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
      security:
        - oauth2:
            - css_manage_enterprise_hierarchy
    put:
      tags:
        - Enterprise
      summary: 'Update an existing enterprise.'
      description: "Updates an existing enterprise. Please note: After
        successful update, the enterprise needs to be provisioned by setting
        the enterprise status to ''READY'' with
        [POST/enterprises/{enterprise_id}/statuses]()"
      operationId: updateEnterprise
      parameters:
        - $ref: '#/components/parameters/enterpriseIdParam'
        - name: If-Match
          in: header
          description: 'The RFC 7232 If-Match header field in a request
            requires the server to only operate on the resource that matches
            the provided entity-tag. This allows clients express a precondition
            that prevent the method from being applied if there have been any
            changes to the resource. See the response headers of GET
            /enterprises/enterprise_id for details about the entity-tag.'
          schema:
            type: string
            example: "11"
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EnterpriseUpdate'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnterpriseDetail'
            application/json;version=2.0.0:
              schema:
                $ref: '#/components/schemas/EnterpriseDetail'
          allOf:
            - $ref: '#/components/responses/RateLimitedResponse'
        '412':
          description: 'Precondition Failed (entity-tag is missing or does not
            match the latest version)'
        '429':
          $ref: '#/components/responses/429'
        default:
          description: 'The standard http error codes will be given. 4XX for
            client errors and 5XX for server errors.'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
      security:
        - oauth2:
            - css_manage_enterprise_hierarchy
  '/enterprises/{enterprise_id}/statuses':
    post:
      tags:
        - Enterprise
      summary: 'Change the status of the enterprise'
      description: "Changes the status of the enterprise by indicating the
        wanted status.\n\nSupported status changes:
        <table><tr><td><b>Current status</b><td><b>Wanted status</b>
        <td><b>Description</b></td></tr><tr><td>draft</td><td>ready</td>
        <td>Submit a draft version of the enterprise for provisioning.</td></tr>
        <tr><td>submitted</td><td>ready</td><td>Retry an earlier submit.
        </td></tr></table>

        \n\n Afterwards, use [GET/enterprises/{enterprise_id}]() to see the
        status of the enterprise. If the status does not become ''READY''
        within a couple of minutes, and provisioning_status is ''FAILURE'',
        try changing the status again."
      operationId: changeEnterpriseStatus
      parameters:
        - $ref: '#/components/parameters/enterpriseIdParam'
        - $ref: '#/components/parameters/statusParam'
        - name: If-Match
          in: header
          description: 'The RFC7232 If-Match header field in a request
            requires the server to only operate on the resource that matches
            at least one of the provided entity-tags. This allows clients
            express a precondition that prevent the method from being applied
            if there have been any changes to the resource.'
          schema:
            type: string
            example: "11"
      responses:
        '202':
          description: 'Request is being processed; use
            [GET/enterprises/{enterprise_id}]() to get the status of the
            enterprise.'
          allOf:
            - $ref: '#/components/responses/RateLimitedResponse'
        '412':
          description: 'Precondition Failed (entity-tag is missing or does
            not match the latest version)'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '429':
          $ref: '#/components/responses/429'
        default:
          description: 'The standard http error codes will be given.
            4XX for client errors and 5XX for server errors.'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
      security:
        - oauth2:
            - css_manage_enterprise_hierarchy
  '/enterprises/{enterprise_id}/subscription-packages':
    get:
      tags:
        - Enterprise
      summary: 'List the subscription packages belonging to my enterprise.'
      operationId: getEnterpriseSubscriptionPackages
      parameters:
        - $ref: '#/components/parameters/enterpriseIdParam'
      responses:
        '200':
          description: OK
          allOf:
            - $ref: '#/components/responses/RateLimitedResponse'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionPackages'
            application/json;version=2.0.0:
              schema:
                $ref: '#/components/schemas/SubscriptionPackages'
        '429':
          $ref: '#/components/responses/429'
        default:
          description: 'The standard http error codes will be given. 4XX for
           client errors and 5XX for server errors.'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
      security:
        - oauth2:
            - css_manage_enterprise_hierarchy
    post:
      tags:
        - Enterprise
      summary: 'Create subscription package for my enterprise'
      description: 'For given enterprise this function creates a subscription package'
      operationId: createSubscriptionPackage
      parameters:
        - $ref: '#/components/parameters/enterpriseIdParam'
        - $ref: '#/components/parameters/tspIdQuery'
      responses:
        '201':
          description: OK
          allOf:
            - $ref: '#/components/responses/RateLimitedResponse'
        '429':
          $ref: '#/components/responses/429'
        default:
          description: 'The standard http error codes will be given. 4XX for
            client errors and 5XX for server errors.'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
      security:
        - oauth2:
            - css_manage_enterprise_hierarchy
  '/enterprises/{parent_enterprise_id}/offers':
    get:
      tags:
        - Enterprise
      summary: 'List the offers belonging to the certain parent enterprise'
      description: 'Note that parent enterprise type must be specific to which
        offers can be assigned. For example: Controller Reseller'
      operationId: getEnterpriseOffers
      parameters:
        - $ref: '#/components/parameters/parentEnterpriseIdParam'
        - $ref: '#/components/parameters/targetEnterpriseId'
      responses:
        '200':
          description: OK
          allOf:
            - $ref: '#/components/responses/RateLimitedResponse'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Offers'
            application/json;version=2.0.0:
              schema:
                $ref: '#/components/schemas/Offers'
        '429':
          $ref: '#/components/responses/429'
        default:
          description: 'The standard http error codes will be given. 4XX for
           client errors and 5XX for server errors.'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
      security:
        - oauth2:
            - css_manage_enterprise_hierarchy
  '/enterprises/network-groups':
    get:
      tags:
        - Network group
      summary: 'List network groups.'
      description: 'List all network groups the user is allowed to view.'
      operationId: getNetworkGroups
      responses:
        '200':
          description: OK
          allOf:
            - $ref: '#/components/responses/RateLimitedResponse'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NetworkGroupsRead'
            application/json;version=2.0.0:
              schema:
                $ref: '#/components/schemas/NetworkGroupsRead'
        '429':
          $ref: '#/components/responses/429'
        default:
          description: 'The standard http error codes will be given. 4XX for
            client errors and 5XX for server errors.'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
      security:
        - oauth2:
            - css_view_resources
  '/enterprises/sim-specifications':
    get:
      tags:
        - SIM specification
      summary: 'List SIM specifications.'
      description: 'List all SIM specifications the user is allowed to view.'
      operationId: getSimSpecifications
      responses:
        '200':
          description: OK
          allOf:
            - $ref: '#/components/responses/RateLimitedResponse'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimSpecificationsRead'
            application/json;version=2.0.0:
              schema:
                $ref: '#/components/schemas/SimSpecificationsRead'
        '429':
          $ref: '#/components/responses/429'
        default:
          description: 'The standard http error codes will be given.4XX for client errors and 5XX for server errors.'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
      security:
        - oauth2:
            - css_view_resources
  '/enterprises/subscription_packages/{subscription_package_id}/deactivate':
    post:
      tags:
        - Enterprise
      summary: 'Deactivate the subscription package'
      description: "Deactivates the subscription package with the given ID"
      operationId: deactivateSubscriptionPackage
      parameters:
        - $ref: '#/components/parameters/spIdToDeactivate'
      responses:
        '202':
          description: 'Request is being processed'
          allOf:
            - $ref: '#/components/responses/RateLimitedResponse'
        '429':
          $ref: '#/components/responses/429'
        default:
          description: 'The standard http error codes will be given.
            4XX for client errors and 5XX for server errors.'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
      security:
        - oauth2:
            - css_deprecate_subscription_package
  '/enterprises/enterprise_groups/{enterprise_group_id}':
    get:
      tags:
        - EnterpriseGroup
      summary: 'Get details of an enterprise group.'
      operationId: getEnterpriseGroupDetails
      parameters:
        - $ref: '#/components/parameters/enterpriseGroupIdParam'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnterpriseGroupDetail'
            application/json;version=2.0.0:
              schema:
                $ref: '#/components/schemas/EnterpriseGroupDetail'
          allOf:
            - $ref: '#/components/responses/RateLimitedResponse'
        '429':
          $ref: '#/components/responses/429'
        default:
          description: 'The standard http error codes will be given.
            Usually 400,403,401,404 or 500.'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
      security:
        - oauth2:
            - css_view_enterprise_groups
    put:
      tags:
        - EnterpriseGroup
      summary: 'Update an existing enterprise group.'
      description: "Updates an existing enterprise group."
      operationId: updateEnterpriseGroup
      parameters:
        - $ref: '#/components/parameters/enterpriseGroupIdParam'
        - name: If-Match
          in: header
          description: 'The RFC 7232 If-Match header field in a request
            requires the server to only operate on the resource that matches
            the provided entity-tag. This allows clients express a precondition
            that prevent the method from being applied if there have been any
            changes to the resource. See the response headers of GET
            /enterprises/enterprise_id for details about the entity-tag.'
          schema:
            type: string
            example: "11"
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EnterpriseGroupUpdate'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnterpriseGroupDetail'
            application/json;version=2.0.0:
              schema:
                $ref: '#/components/schemas/EnterpriseGroupDetail'
          allOf:
            - $ref: '#/components/responses/RateLimitedResponse'
        '412':
          description: 'Precondition Failed (entity-tag is missing or does not match the latest version)'
        '429':
          $ref: '#/components/responses/429'
        default:
          description: 'The standard http error codes will be given. 
            4XX for client errors and 5XX for server errors.'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
      security:
        - oauth2:
            - css_manage_enterprise_hierarchy
            - css_manage_enterprise_groups
components:
  parameters:
    enterpriseIdParam:
      in: path
      name: enterprise_id
      description: 'The id of the requested enterprise. May be either
        organizationID or the deprecated customerNo.'
      required: true
      schema:
        type: string
        minLength: 3
        maxLength: 255
        example: 1.2.3.44
    parentEnterpriseIdParam:
      in: path
      name: parent_enterprise_id
      description: 'The id of the requested parent enterprise.May be either
        organizationID or the deprecated customerNo.'
      required: true
      schema:
        type: string
        minLength: 3
        maxLength: 255
        example: 1.2.3.44
    tspIdQuery:
      in: query
      name: subscription_package_template_id
      description: 'The id of the subscription package template'
      required: true
      schema:
        type: integer
        format: int64
    tagsParam:
      in: query
      name: tags
      description: "Filter the response based on tags. Matching is exact and
        case sensitive. If multiple tags are applied only resources matching
        all filters will be returned (logical 'AND')\n"
      schema:
        type: string
      example: 'business:finance'
    statusParam:
      in: query
      name: enterprise_status
      description: 'The status of an enterprise.'
      required: true
      schema:
        type: string
        x-extensible-enum:
          - READY
        default: 'READY'
        example: 'READY'
    pageNumber:
      in: query
      name: page_number
      description: 'Page number to display list of enterprises'
      schema:
        type: integer
        minimum: 1
        maximum: 99999
        example: 1
        default: 1
    size:
      in: query
      name: size
      description: 'Number of enterprises to be displayed on a page'
      schema:
        type: integer
        minimum: 0
        maximum: 999
        example: 10
        default: 100
    template_sp_id:
      in: query
      name: template_sp_id
      description: 'The id(s) of the Subscription Package Template(s)'
      schema:
        type: array
        items:
          type: integer
          format: int64
        example: 528491, 67534
    targetEnterpriseId:
      in: query
      name: target_enterprise_id
      description: 'The id of the targeted enterprise which should be under a
        parent Enterprise. May be either organizationID or the deprecated
        customerNo. This Id helps to filter out the results specific to the
        target Enterprise only'
      schema:
        type: string
        minLength: 3
        maxLength: 255
        example: 1.2.3.44
    spIdToDeactivate:
      in: path
      name: subscription_package_id
      description: 'The id of the subscription package to deactivate'
      required: true
      schema:
        type: integer
        format: int64
    enterpriseGroupIdParam:
      in: path
      name: enterprise_group_id
      description: 'The id of the requested enterprise group.'
      required: true
      schema:
        type: string
        minLength: 3
        maxLength: 255
        example: 1.2.3.44
  responses:
    RateLimitedResponse:
      headers:
        X-RateLimit-Limit-Second:
          $ref: '#/components/headers/X-RateLimit-Limit-Second'
        X-RateLimit-Limit-Minute:
          $ref: '#/components/headers/X-RateLimit-Limit-Minute'
        X-RateLimit-Remaining-Second:
          $ref: '#/components/headers/X-RateLimit-Remaining-Second'
        X-RateLimit-Remaining-Minute:
          $ref: '#/components/headers/X-RateLimit-Remaining-Minute'
        Content-Type:
          $ref: '#/components/headers/Content-Type'
    '429':
      description: Too Many Requests
      allOf:
        - $ref: '#/components/responses/RateLimitedResponse'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemGeneric'
          example:
            type: about:blank
            title: Too Many Requests
            status: 429
            detail: Too Many Requests. Please refer response RateLimit-* headers before send requests.
            instance: about:blank
  schemas:
    ProblemGeneric:
      type: object
      properties:
        type:
          type: string
          format: uri
          description: |
            An absolute URI that identifies the problem type. When dereferenced,
            it SHOULD provide human-readable documentation for the problem type
            (e.g., using HTML).
          default: about:blank
          example: https://your.api.documentation.url
        title:
          type: string
          description: |
            A short, summary of the problem type. Written in english and readable
            for engineers (usually not suited for non technical stakeholders and
            not localized);
          example: Service Unavailable
        status:
          type: integer
          format: int32
          description: |
            The HTTP status code generated by the origin server for this occurrence
            of the problem.
          minimum: 100
          maximum: 600
          example: 503
        detail:
          type: string
          description: |
            A human readable explanation specific to this occurrence of the
            problem.
          example: Connection to database timed out
        instance:
          type: string
          description: |
            An absolute URI that identifies the specific occurrence of the problem.
            It may or may not yield further information if dereferenced.
          default: about:blank
          example: /iot/api/problems/123e4567-e89b-12d3-a456-426614174000
    EnterprisesRead:
      type: object
      properties:
        enterprises:
          type: array
          # maxItems: ?
          items:
            $ref: '#/components/schemas/EnterpriseRead'
        other_enterprises_available:
          type: boolean
          description: 'Inform the user whether there are more enterprises to be displayed'
          default: true
    EnterpriseRead:
      type: object
      properties:
        id:
          type: string
          description: 'Enterprise ID.'
          minLength: 3
          maxLength: 255
          example: 1.2.3.44
        customer_number:
          deprecated: true
          type: string
          description: 'Legacy identifier for the enterprise. API clients
            should start transitioning to use id instead as the customer_number
            will be removed. Date of removal is not yet known; notice will be
            given at least 6 months before.'
          minLength: 8
          maxLength: 8
          example: '02000044'
        parent_number:
          deprecated: true
          type: string
          description: 'Legacy identifier for the enterprise''s parent. API
            clients should start transitioning to use id instead as the
            parent_number will be removed, and id contains the parent ID. Date
            of removal is not yet known; notice will be given at least 6 months
            before.'
          maxLength: 255
          example: '02000001'
        parent_id:
          type: string
          description: 'ID of the parent organization'
          maxLength: 255
          example: 1.2.3
        name:
          type: string
          description: 'Enterprise name.'
          minLength: 1
          maxLength: 80
          example: MyCompany
        description:
          type: string
          nullable: true
          description: 'Enterprise description.'
          maxLength: 255
          example: 'MyCompany description'
        enterprise_type:
          description: 'Type of the enterprise.'
          type: string
          x-extensible-enum:
            - ENTERPRISE
            - ADVANCED_RESELLER
            - CONTROLLED_RESELLER
          default: ENTERPRISE
          example: ENTERPRISE
        created_at:
          type: string
          description: 'The time when the enterprise was created (ISO 8601 UTC)'
          example: '2019-06-28T00:00:00.000Z'
        status:
          $ref: '#/components/schemas/Status'
        provisioning_status:
          $ref: '#/components/schemas/ProvisioningStatus'
        tags:
          type: array
          description: "A list of API consumer defined text strings that can be used to further describe an enterprise."
          maxItems: 10
          items:
            type: string
          example:
            - 'business:finance'
            - 'market:europe'
        template_sp_id:
          type: array
          description: "A list of template subscription package id are used for an enterprise."
          items:
            type: integer
            format: int64
          example:
            - '1231'
            - '1232'
      required:
        - id
        - parent_id
        - name
        - created_at
        - status
    EnterpriseDetail:
      allOf:
        - $ref: '#/components/schemas/EnterpriseRead'
        - properties:
            agreement_number:
              type: string
              description: "Agreement number for the enterprise. Globally
                unique and case sensitive. Numbers, letters, hyphen, dot and
                underscore are allowed.\n\nCannot be changed once the enterprise
                is created.\n"
              minLength: 1
              maxLength: 20
              example: Abc_1234.5-6
            vat_number:
              type: string
              nullable: true
              description: 'Value Added Tax registration/identification number'
              minLength: 4
              maxLength: 30
              example: FF-123/4.5
            financial_customer_number:
              type: string
              nullable: true
              description: 'Used in client''s financials system to identify the enterprise'
              maxLength: 255
              example: 987-F
            service_contract_ids:
              type: array
              description: 'Service Contract IDs. Not available for unprovisioned (never activated) enterprises'
              maxItems: 99
              uniqueItems: true
              items:
                type: string
                minLength: 7
                maxLength: 30
                example: 123_SC_45
            connectivity:
              $ref: '#/components/schemas/Connectivity'
            security_management:
              description: 'Monitor device behaviour to recognize security
                events, get alerts of suspicious behaviour and apply needed
                mitigation actions to react to identified incidents.'
              type: boolean
              nullable: true
              example: false
            billing_address:
              description: 'Enterprise''s legal/registered address'
              allOf:
                - $ref: '#/components/schemas/Address'
            delivery_addresses:
              description: 'Addresses for SIM delivery'
              type: array
              maxItems: 100
              items:
                $ref: '#/components/schemas/Address'
            has_price_plan:
              description: 'Indicates if a price plan has been assigned to the enterprise'
              type: boolean
              default: false
            subscription_request_notification_enabled:
              description: 'Indicates if notifications about completed
                subscription service requests are sent for this enterprise.
                See document ''Subscription Request Notifications''
                for details'
              type: boolean
              example: false
            sim_specifications:
              type: array
              maxItems: 100
              items:
                $ref: '#/components/schemas/SimSpecification'
            network_groups:
              type: array
              maxItems: 100
              items:
                $ref: '#/components/schemas/BasicData'
            euicc_form_specifications:
              type: array
              maxItems: 100
              items:
                $ref: '#/components/schemas/FormSpecification'
            euicc_profile_specifications:
              type: array
              maxItems: 100
              items:
                $ref: '#/components/schemas/ProfileSpecification'
            offers:
              type: array
              maxItems: 100
              items:
                $ref: '#/components/schemas/BasicData'
            enterprise_group_id:
              type: string
              nullable: true
              description: "Enterprise group ID for the enterprise."
              minLength: 1
              maxLength: 255
              example: 0.1
            cellular_threat_detection_enabled:
              type: boolean
              example: false
            volte_roaming_allowed:
              type: boolean
              example: false
          required:
            - agreement_number
            - billing_address
    EnterpriseWrite:
      type: object
      properties:
        name:
          type: string
          description: 'Enterprise name.'
          minLength: 1
          maxLength: 80
          example: MyCompany
        description:
          type: string
          nullable: true
          description: 'Enterprise description.'
          maxLength: 255
          example: 'MyCompany description'
        tags:
          type: array
          description: "A list of API consumer defined text strings
            that can be used to further describe an enterprise.\n"
          maxItems: 10
          items:
            type: string
          example:
            - 'business:finance'
            - 'foo12345'
        vat_number:
          type: string
          description: 'Value Added Tax registration/identification number'
          minLength: 4
          maxLength: 30
          example: FF-123/4.5
        financial_customer_number:
          type: string
          nullable: true
          description: 'Used in client''s financial system to identify the enterprise'
          maxLength: 255
          example: 987-F
        has_price_plan:
          type: boolean
          description: 'Indicates if the enterprise has a price plan assigned to it'
          default: false
        offer_ids:
          type: array
          description: 'List of Internal IoT-A offer Ids'
          maxItems: 10
          items:
            type: integer
            format: int64
        subscription_request_notification_enabled:
          description: 'Indicates if notifications about completed
            subscription service requests are sent for this enterprise.
            See document ''Subscription Request Notifications'' for details'
          type: boolean
          example: false
        billing_address:
          description: 'Enterprise''s legal/registered address'
          allOf:
            - $ref: '#/components/schemas/Address'
        delivery_addresses:
          description: 'Addresses for SIM delivery'
          type: array
          maxItems: 100
          items:
            $ref: '#/components/schemas/Address'
        sim_specification_ids:
          type: array
          description: 'Internal IDs of the SIM specifications this enterprise
            needs to use. Obtained from [GET/enterprises/sim-specifications]'
          maxItems: 100
          uniqueItems: true
          items:
            type: integer
            format: int64
        network_group_ids:
          type: array
          description: 'Internal IDs of the operator''s network groups this
            enterprise is used in. Mandatory if operator has more than 1
            network group. Obtained from [GET/enterprises/network-groups]'
          maxItems: 100
          uniqueItems: true
          items:
            type: integer
            format: int64
        euicc_specification_ids:
          type: array
          description: 'Internal IDs of the eUICC specifications this enterprise needs to use'
          maxItems: 100
          uniqueItems: true
          items:
            type: integer
            format: int64
        connectivity:
          $ref: '#/components/schemas/Connectivity'
        security_management:
          description: 'Monitor device behaviour to recognize security events,
            get alerts of suspicious behaviour and apply needed mitigation
            actions to react to identified incidents.'
          type: boolean
          nullable: true
          example: false
        cellular_threat_detection_enabled:
          type: boolean
          example: false
        volte_roaming_allowed:
          type: boolean
          example: false
      required:
        - name
    EnterpriseCreate:
      allOf:
        - $ref: '#/components/schemas/EnterpriseWrite'
        - properties:
            enterprise_type:
              description: 'Type of the enterprise'
              type: string
              x-extensible-enum:
                - ENTERPRISE
              default: ENTERPRISE
              example: ENTERPRISE
            parent_id:
              type: string
              description: 'ID of the parent organization'
              maxLength: 255
              example: 1.2.3
            agreement_number:
              type: string
              description: "Agreement number for the enterprise. Globally
                unique and case sensitive. Numbers, letters, hyphen, dot and
                underscore are allowed.\n\nCannot be changed once the enterprise
                is created.\n"
              minLength: 1
              maxLength: 20
              example: Abc_1234.5-6
          required:
            - parent_id
            - agreement_number
            - connectivity
    EnterpriseUpdate:
      allOf:
        - $ref: '#/components/schemas/EnterpriseWrite'
    Connectivity:
      type: object
      description: Connectivity parameters.
      properties:
        sim_order_minimum:
          type: integer
          description: 'Minimum allowed number of SIMs in a SIM order.'
          minimum: 0
          maximum: 2147483647
          example: 20
        payment_terms:
          type: integer
          description: 'Number of days allowed for payment after the end of the billing cycle.'
          minimum: 1
          maximum: 90
          example: 14
        invoice_delivery_type:
          description: 'E-mail, postal or Electronic Data Interchange (EDI)'
          type: string
          x-extensible-enum:
            - EMAIL
            - POSTAL
            - EDI
          example: POSTAL
        email:
          type: string
          nullable: true
          description: 'E-mail address for invoice delivery. Mandatory if invoice_delivery_type is email.'
          minLength: 1
          maxLength: 255
          example: mycompany@example.com
      required:
        - invoice_delivery_type
    Address:
      type: object
      properties:
        contact_person:
          type: string
          description: 'Name of the recipient. Mandatory for billing address.'
          minLength: 3
          maxLength: 60
          example: 'Firstname Lastname'
        street_address:
          type: string
          minLength: 1
          maxLength: 255
          example: 'Main Street 1'
        city:
          type: string
          minLength: 1
          maxLength: 60
          example: Somecity
        zip:
          type: string
          description: 'ZIP code / postal code'
          minLength: 1
          maxLength: 90
          example: ZIP-12345
        country:
          type: string
          minLength: 2
          maxLength: 2
          example: FI
          description: 'Country''s ISO-3166-1 2-character shortcode string'
        state:
          type: string
          nullable: true
          minLength: 4
          maxLength: 6
          example: FI-16
          description: 'State''s / province''s ISO-3166-2 shortcode string'
        phone_number:
          type: string
          nullable: true
          maxLength: 50
          example: +999-12-34567
      required:
        - street_address
        - city
        - zip
        - country
    SimSpecification:
      type: object
      allOf:
        - $ref: '#/components/schemas/BasicData'
        - properties:
            earliest_delivery_in_days:
              type: integer
              nullable: true
              description: 'Minimum number of days from SIM order to earliest possible delivery.'
              example: 15
            order_increment:
              type: integer
              nullable: true
              description: 'The number of SIMs that an order must be incremented with.'
              example: 10
            low_order_threshold:
              type: integer
              nullable: true
              description: 'If number of SIMs in SIM order is smaller than
                the low order threshold, a low order fee may be applied.'
              example: 5
            network_group_id:
              type: integer
              nullable: true
              format: int64
              description: 'Internal ID of the operator''s network group to
                which this SIM specfication belongs. See output of
                [GET/enterprises/network-groups]'
              example: 123
    FormSpecification:
      type: object
      allOf:
        - $ref: '#/components/schemas/BasicData'
        - properties:
            minimum_order_volume:
              type: integer
              description: 'Minimum order volume'
              example: 10
            order_increment:
              type: integer
              description: 'The number of eSIMs that an order must be
                incremented with.'
              example: 10
            sm_sr_endpoint_name:
              type: string
              description: 'sm-sr endpoint'
              example: 4.3.2.1,1.2.3.4
    ProfileSpecification:
      type: object
      allOf:
        - $ref: '#/components/schemas/BasicData'
        - properties:
            number_scheme:
              type: string
              description: 'The number scheme id'
              example: ZZSSCHEME00142,ZZSSCHEME00143
            price_category:
              type: integer
              description: 'The price category'
              example: 5
            profile_type:
              type: string
              x-extensible-enum:
                - BOOTSTRAP
                - VIRTUAL
                - PROVISIONING
                - OPERATIONAL
              description: 'The profile type'
              example: BOOTSTRAP,VIRTUAL
    SubscriptionPackages:
      type: object
      properties:
        items:
          type: array
          maxItems: 255
          items:
            $ref: '#/components/schemas/SubscriptionPackage'
    SubscriptionPackageBase:
      type: object
      properties:
        network_group_id:
          type: integer
          format: int64
          description: 'Internal ID of the operator''s network group to which
            this subscription package belongs. See output of
            [GET/enterprises/network-groups]'
          example: 1234
        commitment_time_in_months:
          type: integer
          minimum: 0
          maximum: 60
          description: 'Time in months when subscriptions can only be moved to
            another subscription package or terminated.'
          example: 36
        freeze_period_in_months:
          type: integer
          minimum: 0
          maximum: 12
          description: 'Time in months when subscriptions can only be
            terminated. May not be longer than commitment period.'
          example: 6
        move_in_fee_with_price_profile_change:
          type: boolean
          description: 'A fee is charged if the price profile also changes
            when moving a subscription into this subscription package'
        move_in_fee_without_price_profile_change:
          type: boolean
          description: 'A fee is charged if the price profile remains the same
            when moving a subscription into this subscription package'
        5g_enabled:
          type: boolean
          description: 'Indicates if this subscription package supports 5G connectivity'
          default: false
        tau_timer:
          description: 'Periodic Tracking Area Update, value in seconds.'
          type: integer
          format: int64
          minimum: 1800
          maximum: 4294967295
          example: 3600
        sms_mo_odb_profile_id:
          type: integer
          maximum: 2147483647
          description: 'SMS firewall Mobile Originating Operator Determined Barrings ID.'
          example: 678
        sms_mt_odb_profile_id:
          type: integer
          maximum: 2147483647
          description: 'SMS firewall Mobile Terminating Operator Determined Barrings ID.'
          example: 789
        ard:
          type: integer
          maximum: 4
          description: "Access Restriction Data\n\n* 0 = UMTS Terrestrial
            Radio Access Network (UTRAN) and GSM/EDGE Radio Access Network
            (GERAN) access allowed\n* 1 = UTRAN access not allowed\n* 2 = GERAN
            access not allowed\n* 3 = 4G access not allowed\n"
          example: 2
        rat_restriction:
          type: array
          description: "Radio Access Technology (RAT) restriction. Any
            combination of following is allowed:\n\n* Fallback to 2G
            restricted\n*  Fallback to 3G restricted\n* LTE access
            rectricted\n* LTE NB-IoT access restricted\n"
          maxItems: 4
          items:
            type: string
            x-extensible-enum:
              - FALLBACK_TO_2G
              - FALLBACK_TO_3G
              - LTE_ACCESS
              - LTE_NBIOT_ACCESS
              - 5G_ACCESS
          example: FALLBACK_TO_2G,LTE_ACCESS
        target_on_pbr_exit:
          type: string
          description: 'ID of target subscription package when exiting
            Parameter Based Registration (PBR, or test mode).'
          minLength: 6
          maxLength: 50
          example: Abc_1234.5-6_SP_222
        network_access_mode:
          type: string
          x-extensible-enum:
            - BOTH
            - ONLY_NON_GPRS
            - ONLY_GPRS
          description: "Network Access Mode (NAM). Allowed choices: \n\n* both
            GPRS and non-GPRS networks\n* only non-GPRS network\n* only GPRS network\n"
        bearer_services:
          type: array
          description: "B2C Business to Consumer\n\nCC Consumer
            Connectivity\n\nCLIP Calling Line Identification Presentation\n\n
            CSD Circuit Switched Data\n\nGPRS General Packet Radio Service\n\n
            LTE Long-Term Evolution\n\nMTC Machine Type Communication\n\nSMSMO
            Short Message Service, Mobile Originated\n\nSMSMT Short Message
            Service, Mobile Terminated\n\nVoice"
          maxItems: 10
          items:
            type: string
            x-extensible-enum:
              - B2C
              - CC
              - CLIP
              - CSD
              - GPRS
              - LTE
              - MTC
              - SMSMO
              - SMSMT
              - VOICE
            example: VOICE, CLIP
        barring_services:
          type: array
          description: "BAIC Barring of All Incoming Calls\n\nBAOC Barring of
            All Outgoing Calls\n\nBOIC Barring of All Outgoing International
            Calls\n\nOPBOPRE Barring of Outgoing Premium Rate Calls
            (Entertainment)"
          maxItems: 4
          items:
            type: string
            x-extensible-enum:
              - BAOC
              - BAIC
              - BOIC
              - OBOPRE
            example: BAIC,BAOC
        cs_only_in_pause:
          type: boolean
          default: false
          description: 'Circuit-switched service only in paused state'
        apns:
          type: array
          maxItems: 10
          description: 'Access Point Name network identifier. Globally unique,
            case insensitive. Numbers, letters, hyphen and dot allowed.'
          example: my.internet.apn
          items:
            type: string
        roaming_profile_2g3g:
          description: 'Roaming profile 2G/3G'
          allOf:
            - $ref: '#/components/schemas/BasicData'
        roaming_profile_lte:
          description: 'LTE roaming profile'
          allOf:
            - $ref: '#/components/schemas/BasicData'
        roaming_profile_lte_v2:
          description: 'LTE roaming profile V2'
          allOf:
            - $ref: '#/components/schemas/BasicData'
        ims:
          description: 'IP Multimedia Subsystem'
          allOf:
            - $ref: '#/components/schemas/BasicData'
        policy_control:
          description: 'Policy control is applied to APNs and defines the data
            volume, Quality of Service (QoS) and reset period.'
          allOf:
            - $ref: '#/components/schemas/BasicData'
        camel_profile:
          type: object
          description: 'Customized Applications for Mobile networks Enhanced
            Logic (CAMEL) profile.'
          allOf:
            - $ref: '#/components/schemas/CamelProfile'
        external_service:
          description: 'Operator-defined external service which is available
            for the enterprise.'
          allOf:
            - $ref: '#/components/schemas/BasicData'
    SubscriptionPackage:
      type: object
      allOf:
        - $ref: '#/components/schemas/BasicData'
        - properties:
            id:
              type: string
              minLength: 6
              maxLength: 50
              example: Abc_1234.5-6_SP_101
            network_group_id:
              type: integer
              format: int64
              description: 'Internal ID of the operator''s network group
                to which this subscription package belongs. See output of
                [GET/enterprises/network-groups]'
              example: 1234
            price_profile_id:
              type: string
              maxLength: 50
              example: PP123456789
            price_profile_name:
              type: string
              maxLength: 255
              example: 'My Price Profile'
            price_plan_name:
              type: string
              maxLength: 255
              example: 'My Price Plan'
            commitment_time_in_months:
              type: integer
              minimum: 0
              maximum: 60
              description: 'Time in months when subscriptions can only be
                moved to another subscription package or terminated.'
              example: 36
            freeze_period_in_months:
              type: integer
              minimum: 0
              maximum: 12
              description: 'Time in months when subscriptions can only be
                terminated. May not be longer than commitment period.'
              example: 6
            move_in_fee_with_price_profile_change:
              type: boolean
              description: 'A fee is charged if the price profile also
                changes when moving a subscription into this subscription package'
            move_in_fee_without_price_profile_change:
              type: boolean
              description: 'A fee is charged if the price profile remains the
                same when moving a subscription into this subscription package'
            5g_enabled:
              type: boolean
              description: 'Indicates if this subscription package supports 5G connectivity'
              default: false
            tau_timer:
              description: 'Periodic Tracking Area Update, value in seconds.'
              type: integer
              format: int64
              minimum: 1800
              maximum: 4294967295
              example: 3600
            sms_mo_odb_profile_id:
              type: integer
              maximum: 2147483647
              description: 'SMS firewall Mobile Originating Operator Determined Barrings ID.'
              example: 678
            sms_mt_odb_profile_id:
              type: integer
              maximum: 2147483647
              description: 'SMS firewall Mobile Terminating Operator Determined Barrings ID.'
              example: 789
            ard:
              type: integer
              maximum: 4
              description: "Access Restriction Data\n\n* 0 = UMTS Terrestrial
                Radio Access Network (UTRAN) and GSM/EDGE Radio Access Network
                (GERAN) access allowed\n* 1 = UTRAN access not allowed\n*
                2 = GERAN access not allowed\n* 3 = 4G access not allowed\n"
              example: 2
            rat_restriction:
              type: array
              description: "Radio Access Technology (RAT) restriction. Any
                combination of following is allowed:\n\n* Fallback to 2G
                restricted\n*  Fallback to 3G restricted\n* LTE access
                rectricted\n* LTE NB-IoT access restricted\n"
              maxItems: 4
              items:
                type: string
                x-extensible-enum:
                  - FALLBACK_TO_2G
                  - FALLBACK_TO_3G
                  - LTE_ACCESS
                  - LTE_NBIOT_ACCESS
                  - 5G_ACCESS
              example: FALLBACK_TO_2G,LTE_ACCESS
            target_on_pbr_exit:
              type: string
              description: 'ID of target subscription package when exiting
                Parameter Based Registration (PBR, or test mode).'
              minLength: 6
              maxLength: 50
              example: Abc_1234.5-6_SP_222
            network_access_mode:
              type: string
              x-extensible-enum:
                - BOTH
                - ONLY_NON_GPRS
                - ONLY_GPRS
              description: "Network Access Mode (NAM). Allowed choices: \n\n*
                both GPRS and non-GPRS networks\n* only non-GPRS network\n*
                only GPRS network\n"
            bearer_services:
              type: array
              description: "B2C Business to Consumer\n\nCC Consumer
                Connectivity\n\nCLIP Calling Line Identification
                Presentation\n\nCSD Circuit Switched Data\n\nGPRS
                General Packet Radio Service\n\nLTE Long-Term
                Evolution\n\nMTC Machine Type Communication\n\nSMSMO
                Short Message Service, Mobile Originated\n\nSMSMT
                Short Message Service, Mobile Terminated\n\nVoice"
              maxItems: 10
              items:
                type: string
                x-extensible-enum:
                  - B2C
                  - CC
                  - CLIP
                  - CSD
                  - GPRS
                  - LTE
                  - MTC
                  - SMSMO
                  - SMSMT
                  - VOICE
                example: VOICE, CLIP
            barring_services:
              type: array
              description: "BAIC Barring of All Incoming Calls\n\nBAOC
                Barring of All Outgoing Calls\n\nBOIC Barring of All Outgoing
                International Calls\n\nOPBOPRE Barring of Outgoing Premium Rate
                Calls (Entertainment)"
              maxItems: 4
              items:
                type: string
                x-extensible-enum:
                  - BAOC
                  - BAIC
                  - BOIC
                  - OBOPRE
                example: BAIC,BAOC
            cs_only_in_pause:
              type: boolean
              default: false
              description: 'Circuit-switched service only in paused state'
            apns:
              type: array
              maxItems: 10
              description: 'Access Point Name network identifier. Globally
                unique, case insensitive. Numbers, letters, hyphen and dot
                allowed.'
              example: my.internet.apn
              items:
                type: string
            roaming_profile_2g3g:
              description: 'Roaming profile 2G/3G'
              allOf:
                - $ref: '#/components/schemas/BasicData'
            roaming_profile_lte:
              description: 'LTE roaming profile'
              allOf:
                - $ref: '#/components/schemas/BasicData'
            roaming_profile_lte_v2:
              description: 'LTE roaming profile V2'
              allOf:
                - $ref: '#/components/schemas/BasicData'
            ims:
              description: 'IP Multimedia Subsystem'
              allOf:
                - $ref: '#/components/schemas/BasicData'
            policy_control:
              description: 'Policy control is applied to APNs and defines the
                data volume, Quality of Service (QoS) and reset period.'
              allOf:
                - $ref: '#/components/schemas/BasicData'
            camel_profile:
              type: object
              description: 'Customized Applications for Mobile networks
                Enhanced Logic (CAMEL) profile.'
              allOf:
                - $ref: '#/components/schemas/CamelProfile'
            external_service:
              description: 'Operator-defined external service which is
                available for the enterprise.'
              allOf:
                - $ref: '#/components/schemas/BasicData'
            move_in_allowed:
              type: boolean
              description: 'Moving subscriptions to this subscription package is allowed.'
            volte_roaming_allowed:
              type: boolean
              description: 'VoLTE roaming is allowed.'
    Offers:
      type: object
      properties:
        offers:
          type: array
          maxItems: 50
          items:
            $ref: '#/components/schemas/Offer'
    Offer:
      type: object
      allOf:
        - $ref: '#/components/schemas/BasicData'
        - properties:
            sim_specifications:
              type: array
              maxItems: 100
              items:
                $ref: '#/components/schemas/SimSpecification'
            form_specifications:
              type: array
              maxItems: 100
              items:
                $ref: '#/components/schemas/FormSpecification'
            profile_specifications:
              type: array
              maxItems: 100
              items:
                $ref: '#/components/schemas/ProfileSpecification'
            network_groups:
              type: array
              maxItems: 100
              items:
                $ref: '#/components/schemas/BasicData'
            sp_templates:
              type: array
              maxItems: 100
              items:
                $ref: '#/components/schemas/TemplateSubscriptionPackage'
            price:
              $ref: '#/components/schemas/price'
            order_limit:
              type: integer
              format: int64
            tsp_price_profile_linkage:
              $ref: '#/components/schemas/TpsPriceMap'
    price:
      type: object
      properties:
        plan_id:
          type: string
          maxLength: 50
          example: PP123456789
        description:
          type: string
          nullable: true
          maxLength: 255
          example: 'My Price Highlights'
        profile_ids:
          type: string
          maxLength: 255
          example: 'profileid1,profileid2'
        plan_name:
          type: string
          maxLength: 255
          example: 'My Price Plan'
    TpsPriceMap:
      type: object
      additionalProperties:
        type: string
        description: 'Mapping of SP Template name to Price Profile Name'
      example:
        TPS Example-1: 'Example Price Profile Name'
        TPS Example-2: 'Example Price Profile Name'
    TemplateSubscriptionPackage:
      type: object
      allOf:
        - $ref: '#/components/schemas/BasicData'
        - $ref: '#/components/schemas/SubscriptionPackageBase'
        # - properties:
        #     service_contract_id:
        #       type: string
        #       minLength: 7
        #       maxLength: 30
        #       example: 123_SC_45
    CamelProfile:
      type: object
      allOf:
        - $ref: '#/components/schemas/BasicData'
        - properties:
            camel_profile_id:
              type: integer
              maximum: 8160
              example: 5005
          required:
            - camel_profile_id
    BasicData:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 255
          example: 'My resource'
        internal_id:
          type: integer
          format: int64
        description:
          type: string
          nullable: true
          maxLength: 500
          example: Descriptive information
        status:
          $ref: '#/components/schemas/Status'
        provisioning_status:
          $ref: '#/components/schemas/ProvisioningStatus'
      required:
        - name
    NetworkGroupsRead:
      type: object
      properties:
        network_groups:
          type: array
          maxItems: 100
          items:
            $ref: '#/components/schemas/NetworkGroupRead'
    NetworkGroupRead:
      type: object
      allOf:
        - $ref: '#/components/schemas/BasicData'
    SimSpecificationsRead:
      type: object
      properties:
        sim_specifications:
          type: array
          maxItems: 100
          items:
            $ref: '#/components/schemas/SimSpecification'
    Status:
      type: string
      description: 'Status of the entity'
      x-extensible-enum:
        - DRAFT
        - READY
        - INVALID
        - SUBMITTED
        - OBSOLETE
      example: READY
    ProvisioningStatus:
      type: string
      description: 'Provisioning status of the entity'
      x-extensible-enum:
        - NONE
        - PENDING
        - STARTED
        - SUCCESS
        - FAILURE
      example: SUCCESS
    Problem:
      type: object
      properties:
        type:
          type: string
          format: uri
          description: "An absolute URI that identifies the problem type.
            When dereferenced,it SHOULD provide\nhuman-readable documentation
            for the problem type (e.g., using HTML).\n"
          default: 'about:blank'
          example: 'http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.4'
        title:
          type: string
          description: "A short, summary of the problem type. Written in
            english and readable for engineers (usually not suited\nfor non
            technical stakeholders and not localized.\n"
          example: 'Service Unavailable'
        status:
          type: integer
          format: int32
          description: 'The HTTP status code generated by the origin server
            for this occurrence of the problem.'
          minimum: 100
          maximum: 600
          exclusiveMaximum: true
          example: 503
        detail:
          type: string
          description: 'A human readable explanation specific to this
            occurrence of the problem.'
          example: 'Connection to database timed out.'
        instance:
          type: string
          description: 'An absolute URI that identifies the specific
            occurrence of the problem. It may or may not yield further
            information if dereferenced.'
          example: 'https://api.documentation.url/request-id'
    Empty:
      type: string
    EnterpriseGroupWrite:
      type: object
      properties:
        companies:
          type: array
          description: "dcpIds of companies to be in the enterprise group.\n"
          items:
            type: integer
            format: int64
      required:
        - companies
    EnterpriseGroupUpdate:
      allOf:
        - $ref: '#/components/schemas/EnterpriseGroupWrite'
    EnterpriseGroupRead:
      type: object
      properties:
        group_id:
          type: string
          description: "group ID of the enterprise group."
          minLength: 1
          maxLength: 255
          example: 0.1
        parent_group_id:
          type: string
          description: "group ID of the parent."
          minLength: 1
          maxLength: 255
          example: 0.1
        enterprise_group_type:
          description: 'ADVANCED_RESELLER, CONTROLLED_RESELLER or ENTERPRISE'
          type: string
          x-extensible-enum:
            - ADVANCED_RESELLER
            - CONTROLLED_RESELLER
            - ENTERPRISE
          example: ENTERPRISE
        lead_organization:
          type: string
          description: "ID of the lead organization."
          minLength: 1
          maxLength: 255
          example: 1.2.3.44
        companies:
          type: array
          description: "The list of companies within the enterprise group.\n"
          items:
            $ref: '#/components/schemas/EnterpriseRead'
    EnterpriseGroupDetail:
      allOf:
        - $ref: '#/components/schemas/EnterpriseGroupRead'
  securitySchemes:
    oauth2:
      type: oauth2
      description: 'The Enterprise API uses OAuth2 and OIDC for authentication
        and authorization.'
      flows:
        password:
          tokenUrl: 'https://iot-api.aeris.com/iot/api/auth/token'
          scopes:
            css_manage_enterprise_hierarchy: 'Grants access to read, create and
             update enterprise and subscription package information.'
            css_view_resources: 'Grants access to read resource information.'
  headers:
    Content-Type:
      description: Handle Content-Type
      schema:
        type: string
    X-RateLimit-Limit-Second:
      description: The maximum number of requests allowed in a second.
      schema:
        type: integer
        format: int32
    X-RateLimit-Limit-Minute:
      description: The maximum number of requests allowed in a minute.
      schema:
        type: integer
        format: int32
    X-RateLimit-Remaining-Second:
      description: The number of requests remaining in a second.
      schema:
        type: integer
        format: int32
    X-RateLimit-Remaining-Minute:
      description: The number of requests remaining in a minute.
      schema:
        type: integer
        format: int32
