Nfon trial-templates API

Trial template operations

OpenAPI Specification

nfon-trial-templates-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  description: 'The NFON Call History API provides endpoints for retrieving, streaming, and deleting call history records for an authenticated NFON Cloud Telephony user.


    This API is currently offered as part of **Login with NFON (Early Access)**. As an early access offering, the API is subject to change. Updates may occur on short notice, though we strive to provide advance notice where possible.


    For more information, see: https://www.nfon.com/en/integrations/login-with-nfon/'
  title: NFON Call History Accounts trial-templates API
  version: 2.0-early-access
  termsOfService: https://www.nfon.com/en/legal/gtc
  contact:
    name: NFON
    email: integration@nfon.com
  license:
    name: NFON proprietary
servers:
- url: https://api.nfon.com/call-history
tags:
- x-displayName: Trial Templates
  description: Trial template operations
  name: trial-templates
paths:
  /tenants/{tenant}/create-trial-template:
    post:
      tags:
      - trial-templates
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTrialTemplateRequest'
        required: true
      parameters:
      - schema:
          type: string
        required: true
        in: path
        description: ''
        name: tenant
      summary: Create tenant trial template
      responses:
        '404':
          content:
            application/json:
              examples:
                example:
                  value:
                    request_id: 550e8400-e29b-41d4-a716-446655440000
                    message: The requested resource was not found
                    code: not_found
                  summary: Not found
              schema:
                $ref: '#/components/schemas/Error'
          headers:
            X-Request-Id:
              schema:
                format: uuid
                type: string
              description: Unique request identifier
          description: Tenant not found
        '400':
          content:
            application/json:
              examples:
                unsupportedContractType:
                  value:
                    errors:
                    - message: trial templates are not supported for nconnect_voice contract type
                      code: bad_request
                      type: validation
                  summary: Unsupported contract type
                invalidRequest:
                  value:
                    errors:
                    - message: Invalid request
                      code: bad_request
                      type: validation
                  summary: Invalid request data
              schema:
                $ref: '#/components/schemas/Error'
          headers:
            X-Request-Id:
              schema:
                format: uuid
                type: string
              description: Unique request identifier
          description: Invalid request or unsupported contract type
        '409':
          content:
            application/json:
              examples:
                example:
                  value:
                    request_id: 550e8400-e29b-41d4-a716-446655440000
                    message: A resource with this identifier already exists
                    code: conflict
                  summary: Conflict
              schema:
                $ref: '#/components/schemas/Error'
          headers:
            X-Request-Id:
              schema:
                format: uuid
                type: string
              description: Unique request identifier
          description: Conflict
        '503':
          content:
            application/json:
              examples:
                example:
                  value:
                    request_id: 550e8400-e29b-41d4-a716-446655440000
                    message: The service is temporarily unavailable. Please try again later.
                    code: upstream_unavailable
                  summary: Service unavailable
              schema:
                $ref: '#/components/schemas/Error'
          headers:
            X-Request-Id:
              schema:
                format: uuid
                type: string
              description: Unique request identifier
          description: Service temporarily unavailable
        '204':
          headers:
            X-Request-Id:
              schema:
                format: uuid
                type: string
              description: Unique request identifier
          description: Trial template created
        '500':
          content:
            application/json:
              examples:
                example:
                  value:
                    request_id: 550e8400-e29b-41d4-a716-446655440000
                    message: Internal server error
                    code: internal_error
                  summary: Internal server error
              schema:
                $ref: '#/components/schemas/Error'
          headers:
            X-Request-Id:
              schema:
                format: uuid
                type: string
              description: Unique request identifier
          description: Internal server error
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          headers:
            X-Request-Id:
              schema:
                format: uuid
                type: string
              description: Unique request identifier
          description: Unprocessable entity
      operationId: createTenantTrialTemplate
      security:
      - OAuth2:
        - bss.license-manage
      description: Creates a trial template for a tenant. Only supports PBX contract types. Trial templates are not supported for nconnect_voice contract type.
components:
  schemas:
    CreateTrialTemplateRequest:
      properties:
        device:
          $ref: '#/components/schemas/TrialTemplateDevice'
        trunk:
          $ref: '#/components/schemas/TrialTemplateTrunk'
        sales_force_id:
          deprecated: true
          type: string
          example: a06D000000kIkHp
          maxLength: 50
          description: 'BSS-provided template identifier. Use template_id for new integrations. Deprecated: use TemplateID instead.'
        site_id:
          type: string
          description: BSS-provided site identifier (preferred over site_sales_force_id).
          maxLength: 50
          example: a06D000000kIkHq
        site_sales_force_id:
          deprecated: true
          type: string
          example: a06D000000kIkHq
          maxLength: 50
          description: 'BSS-provided site identifier. Use site_id for new integrations. Deprecated: use SiteID instead.'
        template_id:
          type: string
          description: BSS-provided template identifier (preferred over sales_force_id).
          maxLength: 50
          example: a06D000000kIkHp
      type: object
      required:
      - trunk
      description: CreateTrialTemplateRequest wraps needed fields to start a trial for a customer.
    Error:
      properties:
        request_id:
          type: string
          example: 550e8400-e29b-41d4-a716-446655440000
        code:
          type: string
          example: bad_request
        details:
          $ref: '#/components/schemas/ErrorDetail'
        message:
          type: string
          example: Invalid request
      type: object
      description: Error represents the standard API error response.
    TrialTemplateDevice:
      properties:
        firmware:
          type: string
          description: Firmware version.
          maxLength: 50
          example: 1.0.0
        device_type:
          type: string
          description: Device type.
          maxLength: 12
          example: DEVICE001
        unique_identifier:
          example: '001122334455'
          type: string
          minLength: 12
          maxLength: 12
          description: Device unique identifier (MAC address).
      type: object
      required:
      - device_type
      - unique_identifier
      description: DeviceCreateTrialTemplateRequest represents device configuration for trial template. This is named TrialTemplateDevice in the OpenAPI spec.
    TrialTemplateTrunk:
      properties:
        trunk_number:
          maximum: 9
          minimum: 0
          example: '0'
          type: integer
          format: int64
          description: Trunk number.
        base_number:
          $ref: '#/components/schemas/BaseNumber'
        carrier_name:
          type: string
          description: Carrier name.
          maxLength: 100
          example: Deutsche Telekom
        softswitch:
          type: string
          description: Softswitch.
          maxLength: 16
          example: BTNGN1
        pilot_reachable:
          type: boolean
          description: Pilot reachable.
          example: 'true'
      type: object
      required:
      - carrier_name
      - softswitch
      - base_number
      description: TrunkCreateTrialTemplateRequest represents trunk configuration for trial template. This is named TrialTemplateTrunk in the OpenAPI spec.
    BaseNumber:
      properties:
        extension:
          type: string
          maxLength: 255
          description: Extension (deprecated, ignored for trunk base numbers)
        country_code:
          type: string
          description: ISO country code (1-3 digits, no leading zeros)
          maxLength: 255
          example: '49'
        national_destination_code:
          type: string
          description: National destination code
          maxLength: 255
          example: '30'
        pilot:
          type: string
          description: Pilot number
          maxLength: 255
          example: '12345'
      type: object
      required:
      - country_code
      - national_destination_code
      - pilot
      description: BaseNumberCreateTrunkRequest represents base number for trunk creation. This is named BaseNumber in the OpenAPI spec.
    ErrorDetail:
      properties:
        message:
          type: string
          example: Cannot delete license that is currently assigned to a user
        code:
          type: string
          example: license_assigned
      type: object
      description: ErrorDetail represents error details in the delete response.
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JSON Web Token