openapi: 3.2.0
info:
description: "MobileServicesManagement APIs\n\n ---\n \n ## [Source view](https://app.swaggerhub.com/apis/kpn/MobileServicesManagement-KPN/)
\n [Documentation view](https://app.swaggerhub.com/apis/kpn/MobileServicesManagement-KPN/)\n \n ---\n \n ## [KPN Developer](https://developer.kpn.com/)
\n [Getting Started](https://developer.kpn.com/getting-started)\n \n\n ---"
version: v11
title: MobileServicesManagement-KPN Rest User Controller API
termsOfService: https://developer.kpn.com/legal
contact:
name: API Support
email: api_developer@kpn.com
url: https://developer.kpn.com/support
servers:
- url: https://api-prd.kpn.com/mobile/kpn/mobileservices
tags:
- name: rest-user-controller
description: Rest User Controller
paths:
/hierarchy/grip-entities:
get:
tags:
- rest-user-controller
summary: Get all grip entities not linked to subscriber
description: Required privileges (one of the following):
- privileges_un-authorized_orders_creation
- privileges_orders_authorization
- privileges_virtual_hierarchy_management
- privileges_bulk_upload_data_of_end_user
operationId: getGripEntitiesUsingGET
responses:
'200':
description: OK
content:
'*/*':
schema:
type: array
items:
$ref: '#/components/schemas/GripEntity'
'400':
description: Bad Request
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Forbidden
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Not Found
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
'429':
description: Too Many Requests
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Server Error
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
'503':
description: Service Unavailable
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- OAuth2: []
/hierarchy/subscribers/link:
post:
tags:
- rest-user-controller
summary: Link existing subscriber to grip identity
description: "Possible errors when validating request:\n | ERROR CODE | CODE |DESCRIPTION |\n|-----------------------------------------------|-------|-------------------------------------------------------------------------------|\n| `ORDERING_IS_BLOCKED_FOR_CUSTOMER` | `403` | Current customer is frozen and can not order anything .|\n| `VIRTUAL_HIERARCHY_ITEM_NOT_FOUND` | `404` | given subscriber does not exist or user does not have access to him |\n| `GRIP_ENTITY_NOT_FOUND` | `404` | given gripEntity does not exist or user does not have access to it |\n| `ROLE_NOT_FOUND` | `404` | given role does not exist or user does not have access to it |\n| `MOBILE_OR_FIXED_NUMBER_IS_REQUIRED` | `400` | mobile or fixed number must be passed in request |\n| `SUBSCRIBER_IS_ALREADY_USER` | `400` | given subscriber is already an user |\n\nRequired privileges (one of the following):- privileges_un-authorized_orders_creation
- privileges_orders_authorization
- privileges_virtual_hierarchy_management
- privileges_bulk_upload_data_of_end_user
"
operationId: linkSubscriberToGripIdentityUsingPOST
responses:
'200':
description: OK
content:
'*/*':
schema:
$ref: '#/components/schemas/OrderSummary'
'400':
description: Bad Request
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Forbidden
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Not Found
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
'429':
description: Too Many Requests
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Server Error
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
'503':
description: Service Unavailable
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- OAuth2: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/LinkSubscriberToGripRequestParams'
description: params
required: true
/hierarchy/subscribers/roles:
get:
tags:
- rest-user-controller
summary: Get all roles
operationId: getAllRolesUsingGET
parameters:
- name: from
in: query
description: Pagination parameter - start from (included). The elements are counted from 0. Default value is 0.
required: false
x-example: 0
schema:
type: integer
format: int32
- name: order
in: query
required: false
schema:
type: string
enum:
- ASC
- DESC
- name: pattern
in: query
required: false
schema:
type: string
- name: sortBy
in: query
required: false
schema:
type: string
enum:
- NAME
- SELECTED
- name: to
in: query
description: Pagination parameter - end element (exluded). Default value is 20.
required: false
x-example: 20
schema:
type: integer
format: int32
responses:
'200':
description: OK
content:
'*/*':
schema:
$ref: '#/components/schemas/PagedResult_Role_'
'400':
description: Bad Request
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Forbidden
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Not Found
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
'429':
description: Too Many Requests
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Server Error
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
'503':
description: Service Unavailable
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- OAuth2: []
/hierarchy/subscribers/roles/{roleId}/privileges:
get:
tags:
- rest-user-controller
summary: Get privileges for given role
operationId: getRolePrivilegesUsingGET
parameters:
- name: roleId
in: path
description: roleId
required: true
schema:
type: integer
format: int64
responses:
'200':
description: OK
content:
'*/*':
schema:
type: array
items:
type: string
'400':
description: Bad Request
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Forbidden
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Not Found
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
'429':
description: Too Many Requests
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Server Error
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
'503':
description: Service Unavailable
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- OAuth2: []
/hierarchy/subscribers/{id}/assign-entities:
post:
tags:
- rest-user-controller
summary: Assign hierarchy entities managed by employee
description: Required privileges (one of the following):- privileges_un-authorized_orders_creation
- privileges_orders_authorization
- privileges_virtual_hierarchy_management
- privileges_bulk_upload_data_of_end_user
operationId: assignEntitiesUsingPOST
parameters:
- name: id
in: path
description: id
required: true
schema:
type: integer
format: int64
responses:
'200':
description: OK
'400':
description: Bad Request
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Forbidden
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Not Found
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
'429':
description: Too Many Requests
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Server Error
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
'503':
description: Service Unavailable
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- OAuth2: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ManagedGroupAssignmentParams'
description: params
required: true
/hierarchy/subscribers/{id}/managed-entities:
get:
tags:
- rest-user-controller
summary: Get hierarchy entities managed by employee
description: Required privileges (one of the following):- privileges_un-authorized_orders_creation
- privileges_orders_authorization
- privileges_virtual_hierarchy_management
- privileges_bulk_upload_data_of_end_user
operationId: getManagedGroupsUsingGET
parameters:
- name: id
in: path
description: id
required: true
schema:
type: integer
format: int64
responses:
'200':
description: OK
content:
'*/*':
schema:
type: array
items:
$ref: '#/components/schemas/VirtualHierarchyItem'
'400':
description: Bad Request
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Forbidden
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Not Found
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
'429':
description: Too Many Requests
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Server Error
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
'503':
description: Service Unavailable
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- OAuth2: []
/hierarchy/subscribers/{id}/unassign-entities:
post:
tags:
- rest-user-controller
summary: Assign hierarchy entities managed by employee
description: Required privileges (one of the following):- privileges_un-authorized_orders_creation
- privileges_orders_authorization
- privileges_virtual_hierarchy_management
- privileges_bulk_upload_data_of_end_user
operationId: unassignEntitiesUsingPOST
parameters:
- name: id
in: path
description: id
required: true
schema:
type: integer
format: int64
responses:
'200':
description: OK
'400':
description: Bad Request
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Forbidden
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Not Found
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
'429':
description: Too Many Requests
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Server Error
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
'503':
description: Service Unavailable
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- OAuth2: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ManagedGroupAssignmentParams'
description: params
required: true
/hierarchy/subscribers/{subscriberId}/roles:
get:
tags:
- rest-user-controller
summary: Get roles for given subscriber user
description: Required privileges (one of the following):- privileges_un-authorized_orders_creation
- privileges_orders_authorization
- privileges_virtual_hierarchy_management
- privileges_bulk_upload_data_of_end_user
operationId: getSubscriberUserRolesUsingGET
parameters:
- name: from
in: query
description: Pagination parameter - start from (included). The elements are counted from 0. Default value is 0.
required: false
x-example: 0
schema:
type: integer
format: int32
- name: order
in: query
required: false
schema:
type: string
enum:
- ASC
- DESC
- name: pattern
in: query
required: false
schema:
type: string
- name: sortBy
in: query
required: false
schema:
type: string
enum:
- NAME
- SELECTED
- name: subscriberId
in: path
description: subscriberId
required: true
schema:
type: integer
format: int64
- name: to
in: query
description: Pagination parameter - end element (exluded). Default value is 20.
required: false
x-example: 20
schema:
type: integer
format: int32
responses:
'200':
description: OK
content:
'*/*':
schema:
$ref: '#/components/schemas/PagedResult_Role_'
'400':
description: Bad Request
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Forbidden
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Not Found
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
'429':
description: Too Many Requests
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Server Error
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
'503':
description: Service Unavailable
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- OAuth2: []
post:
tags:
- rest-user-controller
summary: Edit roles assigned for given subscriber user
description: Required privileges (one of the following):- privileges_un-authorized_orders_creation
- privileges_orders_authorization
- privileges_virtual_hierarchy_management
- privileges_bulk_upload_data_of_end_user
operationId: editSubscriberUserRolesUsingPOST
parameters:
- name: subscriberId
in: path
description: subscriberId
required: true
schema:
type: integer
format: int64
responses:
'200':
description: OK
'400':
description: Bad Request
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
'401':
description: Unauthorized
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
'403':
description: Forbidden
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
'404':
description: Not Found
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
'429':
description: Too Many Requests
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Server Error
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
'503':
description: Service Unavailable
content:
'*/*':
schema:
$ref: '#/components/schemas/ErrorResponse'
security:
- OAuth2: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/EditRolesRequest'
description: request
required: true
components:
schemas:
ErrorResponse:
type: object
properties:
transactionId:
type: string
description: transaction id of the the request
title: Transaction ID
status:
type: string
description: Status
title: Status
name:
type: string
description: Error name
title: Error name
message:
type: string
description: Error message
title: Error message
info:
type: string
description: Additional information about error
title: Info
OrderSummary:
type: object
properties:
contextName:
type: string
creationDate:
type: string
id:
type: integer
format: int64
operation:
type: string
referenceNumber:
type: string
status:
type: string
enum:
- Failed
- Aborted
- Finished
- Suspended
- InProgress
- Waiting
- Draft
- WaitingForAuthorization
- Authorized
- Restored
- Canceled
- Scheduled
- Initialized
- Rejected
- ExternalScheduled
title: OrderSummary
BlockingOrder:
type: object
properties:
id:
type: integer
format: int64
kpnReference:
type: string
status:
type: string
enum:
- IN_PROGRESS
- UNAUTHORIZED
- NEW
- CLOSED
- CANCELED
- REJECTED
- DRAFT
- THIRD_PARTY
- HOLD_CUSTOMER
- WAITING
type:
type: string
enum:
- CONTRACTING
- SERVICE_REQUEST
title: BlockingOrder
LinkSubscriberToGripRequestParams:
type: object
properties:
email:
type: string
fixedNumber:
type: string
description: Should apply to format 31XXXYYYZZZ or 0XXXYYYZZZ
gripEntityId:
type: integer
format: int64
managedEntities:
type: array
items:
type: integer
format: int64
mobileNumber:
type: string
description: Should apply to format 316XXXYYYZZ or 06XXXYYYZZ
referenceNumber:
type: string
roles:
type: array
items:
type: integer
format: int64
subscriberId:
type: integer
format: int64
title: LinkSubscriberToGripRequestParams
Role:
type: object
properties:
id:
type: integer
format: int64
name:
type: string
selected:
type: boolean
title: Role
GripEntity:
type: object
properties:
email:
type: string
employeeNumber:
type: string
firstName:
type: string
fixedNumber:
type: string
gender:
type: string
enum:
- MALE
- FEMALE
- OTHER
id:
type: integer
format: int64
mobileNumber:
type: string
preferredLanguage:
type: string
enum:
- EN
- NL
surname:
type: string
userName:
type: string
title: GripEntity
ManagedGroupAssignmentParams:
type: object
properties:
groupIds:
type: array
items:
type: integer
format: int64
title: ManagedGroupAssignmentParams
OperationState:
type: object
properties:
blocked:
type: boolean
blockingOrders:
type: array
items:
$ref: '#/components/schemas/BlockingOrder'
reason:
type: string
title: OperationState
PagedResult_Role_:
type: object
properties:
result:
type: array
description: One page of result
items:
$ref: '#/components/schemas/Role'
total:
type: integer
format: int32
description: Total number of all elements in collection
title: PagedResult_Role_
description: Paged list of elements
EditRolesRequest:
type: object
properties:
rolesToAdd:
type: array
items:
type: integer
format: int64
rolesToRemove:
type: array
items:
type: integer
format: int64
title: EditRolesRequest
VirtualHierarchyItem:
type: object
properties:
costCenterNumber:
type: string
email:
type: string
employeeNumber:
type: string
firstName:
type: string
id:
type: integer
format: int64
lastName:
type: string
name:
type: string
operation:
$ref: '#/components/schemas/OperationState'
path:
type: array
items:
$ref: '#/components/schemas/VirtualHierarchyItem'
prefix:
type: string
type:
type: string
enum:
- CUSTOMER
- DEBTOR
- SUBSCRIBER
- COST_CENTER
- CUSTOM_GROUP
- BUSINESS_LOCATION
title: VirtualHierarchyItem
securitySchemes:
OAuth2:
type: oauth2
flows:
clientCredentials:
scopes: {}
tokenUrl: https://api-prd.kpn.com/oauth/grip/msm/accesstoken?grant_type=client_credentials