Nfon Customer Phone Books API

The Customer Phone Books API from Nfon — 5 operation(s) for customer phone books.

OpenAPI Specification

nfon-customer-phone-books-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 Customer Phone Books 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:
- name: Customer Phone Books
paths:
  /tenants/{participantExternalIdentifier}/phone-books/{phoneBookId}:
    put:
      requestBody:
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/PhoneBookPUTRequest'
      parameters:
      - schema:
          format: int64
          type: integer
        required: true
        in: path
        name: phoneBookId
      - schema:
          type: string
        required: true
        in: path
        name: participantExternalIdentifier
      tags:
      - Customer Phone Books
      operationId: put_40
      security:
      - oauth2:
        - tenant.manager
      - oauth2:
        - tenant.system-integrator
      - oauth2:
        - tenant.operator
      - oauth2:
        - tenant.admin
      responses:
        '404':
          description: Not found
        '204':
          description: Updated
        '400':
          description: Validation error
        '403':
          description: Insufficient permissions
    delete:
      parameters:
      - schema:
          format: int64
          type: integer
        required: true
        in: path
        name: phoneBookId
      - schema:
          type: string
        required: true
        in: path
        name: participantExternalIdentifier
      tags:
      - Customer Phone Books
      operationId: delete_39
      security:
      - oauth2:
        - tenant.manager
      - oauth2:
        - tenant.system-integrator
      - oauth2:
        - tenant.operator
      - oauth2:
        - tenant.admin
      responses:
        '404':
          description: Not found
        '204':
          description: Deleted
        '403':
          description: Insufficient permissions
    get:
      parameters:
      - schema:
          format: int64
          type: integer
        required: true
        in: path
        name: phoneBookId
      - schema:
          type: string
        required: true
        in: path
        name: participantExternalIdentifier
      tags:
      - Customer Phone Books
      operationId: get_129
      security:
      - oauth2:
        - tenant.manager
      - oauth2:
        - tenant.system-integrator
      - oauth2:
        - tenant.operator
      - oauth2:
        - tenant.admin
      responses:
        '200':
          content:
            application/vnd.collection.next+json:
              schema:
                $ref: '#/components/schemas/NfonApiResponse'
              example:
                links:
                - href: /api/customers/K1234/phonebook/1/visibilities
                  rel: phoneBookVisibilities
                - href: /api/customers/K1234/available-vpn-providers
                  rel: availableVpnProviders
                data:
                - value: John Smith
                  name: displayName
                - value: +49 89 123456
                  name: displayNumber
                - value: '200'
                  name: vpnNumber
                - value: NFON
                  name: vpnProvider
                href: /api/customers/example-id/phone-books/example-id
          description: Success
        '403':
          description: Insufficient permissions
        '404':
          description: Not found
  /tenants/{participantExternalIdentifier}/phone-books/{phoneBookId}/visibilities:
    post:
      requestBody:
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/PhoneBookVisibilityPOSTRequest'
      parameters:
      - schema:
          type: string
        required: true
        in: path
        name: participantExternalIdentifier
      - schema:
          type: string
        required: true
        in: path
        name: phoneBookId
      tags:
      - Customer Phone Books
      operationId: post_41
      security:
      - oauth2:
        - tenant.manager
      - oauth2:
        - tenant.system-integrator
      - oauth2:
        - tenant.operator
      - oauth2:
        - tenant.admin
      responses:
        '403':
          description: Insufficient permissions
        '400':
          description: Validation error
        '201':
          description: Created
    delete:
      parameters:
      - schema:
          type: string
        required: true
        in: path
        name: participantExternalIdentifier
      - schema:
          type: string
        required: true
        in: path
        name: phoneBookId
      tags:
      - Customer Phone Books
      operationId: delete_40
      security:
      - oauth2:
        - tenant.manager
      - oauth2:
        - tenant.system-integrator
      - oauth2:
        - tenant.operator
      - oauth2:
        - tenant.admin
      responses:
        '404':
          description: Not found
        '204':
          description: Deleted
        '403':
          description: Insufficient permissions
    get:
      parameters:
      - schema:
          type: string
        required: true
        in: path
        name: participantExternalIdentifier
      - schema:
          type: string
        required: true
        in: path
        name: phoneBookId
      tags:
      - Customer Phone Books
      operationId: get_131
      security:
      - oauth2:
        - tenant.manager
      - oauth2:
        - tenant.system-integrator
      - oauth2:
        - tenant.operator
      - oauth2:
        - tenant.admin
      responses:
        '200':
          content:
            application/vnd.collection.next+json:
              schema:
                $ref: '#/components/schemas/NfonApiCollectionResponse'
          description: Success
        '403':
          description: Insufficient permissions
  /tenants/{participantExternalIdentifier}/phone-books/{phoneBookId}/visibilities/available-phone-extensions:
    get:
      parameters:
      - schema:
          type: string
        required: true
        in: path
        name: participantExternalIdentifier
      - schema:
          type: string
        required: true
        in: path
        name: phoneBookId
      tags:
      - Customer Phone Books
      operationId: get_130
      security:
      - oauth2:
        - tenant.manager
      - oauth2:
        - tenant.system-integrator
      - oauth2:
        - tenant.operator
      - oauth2:
        - tenant.admin
      responses:
        '200':
          content:
            application/vnd.collection.next+json:
              schema:
                $ref: '#/components/schemas/NfonApiCollectionResponse'
          description: Success
        '403':
          description: Insufficient permissions
        '404':
          description: Not found
  /tenants/{participantExternalIdentifier}/phone-books/{phoneBookId}/visibilities/{extensionNumber}:
    delete:
      parameters:
      - schema:
          type: string
        required: true
        in: path
        name: extensionNumber
      - schema:
          type: string
        required: true
        in: path
        name: participantExternalIdentifier
      - schema:
          type: string
        required: true
        in: path
        name: phoneBookId
      tags:
      - Customer Phone Books
      operationId: delete_41
      security:
      - oauth2:
        - tenant.manager
      - oauth2:
        - tenant.system-integrator
      - oauth2:
        - tenant.operator
      - oauth2:
        - tenant.admin
      responses:
        '404':
          description: Not found
        '204':
          description: Deleted
        '403':
          description: Insufficient permissions
    get:
      parameters:
      - schema:
          type: string
        required: true
        in: path
        name: extensionNumber
      - schema:
          type: string
        required: true
        in: path
        name: participantExternalIdentifier
      - schema:
          type: string
        required: true
        in: path
        name: phoneBookId
      tags:
      - Customer Phone Books
      operationId: get_132
      security:
      - oauth2:
        - tenant.manager
      - oauth2:
        - tenant.system-integrator
      - oauth2:
        - tenant.operator
      - oauth2:
        - tenant.admin
      responses:
        '200':
          content:
            application/vnd.collection.next+json:
              schema:
                $ref: '#/components/schemas/NfonApiResponse'
              example:
                links:
                - href: /api/customers/K1234/phone-extensions/100
                  rel: phoneExtension
                data:
                - value: '100'
                  name: extensionNumber
                - value: John Smith
                  name: displayName
                href: /api/customers/example-id/phone-books/example-id/visibilities/example-id
          description: Success
        '403':
          description: Insufficient permissions
        '404':
          description: Not found
  /tenants/{participantExternalIdentifier}/phone-books:
    post:
      requestBody:
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/PhoneBookPOSTRequest'
      parameters:
      - schema:
          type: string
        required: true
        in: path
        name: participantExternalIdentifier
      tags:
      - Customer Phone Books
      operationId: post_40
      security:
      - oauth2:
        - tenant.manager
      - oauth2:
        - tenant.system-integrator
      - oauth2:
        - tenant.operator
      - oauth2:
        - tenant.admin
      responses:
        '403':
          description: Insufficient permissions
        '400':
          description: Validation error
        '201':
          description: Created
    delete:
      parameters:
      - schema:
          type: string
        required: true
        in: path
        name: participantExternalIdentifier
      tags:
      - Customer Phone Books
      operationId: delete_38
      security:
      - oauth2:
        - tenant.manager
      - oauth2:
        - tenant.system-integrator
      - oauth2:
        - tenant.operator
      - oauth2:
        - tenant.admin
      responses:
        '404':
          description: Not found
        '204':
          description: Deleted
        '403':
          description: Insufficient permissions
    get:
      parameters:
      - schema:
          type: string
        required: true
        in: path
        name: participantExternalIdentifier
      tags:
      - Customer Phone Books
      operationId: get_128
      security:
      - oauth2:
        - tenant.manager
      - oauth2:
        - tenant.system-integrator
      - oauth2:
        - tenant.operator
      - oauth2:
        - tenant.admin
      responses:
        '200':
          content:
            application/vnd.collection.next+json:
              schema:
                $ref: '#/components/schemas/NfonApiCollectionResponse'
              example:
                links: {}
                data:
                - value: John Smith
                  name: displayName
                - value: +49 89 123456
                  name: displayNumber
                - value: '200'
                  name: vpnNumber
                - value: NFON
                  name: vpnProvider
                href: /api/customers/example-id/phone-books
          description: Success
        '403':
          description: Insufficient permissions
components:
  schemas:
    String:
      properties:
        notNull:
          type: boolean
        notPresent:
          type: boolean
        present:
          type: boolean
        presentNotNull:
          type: boolean
        presentNull:
          type: boolean
        value:
          type: string
      type: object
      description: Link to the last page
    CollectionLinks:
      properties:
        first:
          $ref: '#/components/schemas/String'
        prev:
          $ref: '#/components/schemas/String'
        next:
          $ref: '#/components/schemas/String'
        last:
          $ref: '#/components/schemas/String'
      type: object
      description: Pagination links for collection responses
    NoLinks:
      type: object
    NfonApiResponse:
      properties:
        links:
          $ref: '#/components/schemas/Links'
        data:
          description: Resource data (name/value pairs or structured object)
          type: object
        href:
          example: /api/sip-servers/100
          type: string
          description: Self-link to this resource
      type: object
      description: Standard API response envelope for a single resource
    PhoneBookVisibilityPOSTLinks:
      properties:
        phoneExtension:
          example: /api/customers/K1234/phone-extensions/100
          type: string
      type: object
    NfonApiCollectionResponsePage:
      properties:
        links:
          $ref: '#/components/schemas/CollectionLinks'
        offset:
          example: 0
          description: Current page offset
          format: int64
          type: integer
        total:
          example: 42
          description: Total number of items in the collection
          format: int64
          type: integer
        items:
          type: array
          items:
            $ref: '#/components/schemas/NfonApiResponse'
          description: Items in this page
        size:
          example: 20
          description: Number of items in this page
          format: int32
          type: integer
        href:
          description: Self-link to this collection
          type: string
      type: object
      description: Paginated collection response envelope
    PhoneBookPUTRequest:
      properties:
        links:
          $ref: '#/components/schemas/NoLinks'
        data:
          $ref: '#/components/schemas/PhoneBookPUTData'
        items:
          items:
            type: object
          type: array
        itemCount:
          format: int32
          type: integer
      type: object
    PhoneBookPUTData:
      properties:
        vpnNumber:
          $ref: '#/components/schemas/String'
        vpnProvider:
          $ref: '#/components/schemas/String'
        displayName:
          $ref: '#/components/schemas/String'
        displayNumber:
          $ref: '#/components/schemas/String'
      type: object
    PhoneBookPOSTData:
      properties:
        vpnNumber:
          $ref: '#/components/schemas/String'
        vpnProvider:
          $ref: '#/components/schemas/String'
        displayName:
          example: John Smith
          type: string
        displayNumber:
          example: +49 89 123456
          type: string
      type: object
    NfonApiCollectionResponse:
      oneOf:
      - $ref: '#/components/schemas/NfonApiCollectionResponsePage'
      - $ref: '#/components/schemas/NfonApiCollectionResponseNonPage'
      type: object
      description: Collection response envelope
    Links:
      description: Related resource links
      type: object
    NoData:
      type: object
    PhoneBookPOSTRequest:
      properties:
        links:
          $ref: '#/components/schemas/NoLinks'
        data:
          $ref: '#/components/schemas/PhoneBookPOSTData'
        items:
          items:
            type: object
          type: array
        itemCount:
          format: int32
          type: integer
      type: object
    NfonApiCollectionResponseNonPage:
      properties:
        links:
          $ref: '#/components/schemas/Links'
        href:
          description: Self-link to this collection
          type: string
        items:
          type: array
          items:
            $ref: '#/components/schemas/NfonApiResponse'
          description: All items in the collection
      type: object
      description: Non-paginated collection response envelope
    PhoneBookVisibilityPOSTRequest:
      properties:
        links:
          $ref: '#/components/schemas/PhoneBookVisibilityPOSTLinks'
        data:
          $ref: '#/components/schemas/NoData'
        items:
          items:
            type: object
          type: array
        itemCount:
          format: int32
          type: integer
      type: object
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JSON Web Token