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 Threshold 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-threshold-controller description: Rest Threshold Controller paths: /contract/thresholds: get: tags: - rest-threshold-controller summary: Get list of thresholds description: 'Return list of thresholds for current user. Required privileges (one of the following):' operationId: getThresholdsUsingGET responses: '200': description: OK content: '*/*': schema: type: array items: $ref: '#/components/schemas/Threshold' '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-threshold-controller summary: Create new threshold description: "Creates new threshold. Name must be unique in context of customer.\n\n
The request is validated. Possible validation errors: \n| HTTP code | Error code | Description |\n|-----------|--------------------------|-------------------------------------------------------|\n| `400` | `VALUE_NOT_UNIQUE` | `name` must be unique in context of customer |\n\nRequired privilege:" operationId: createNewThresholdUsingPOST 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/ThresholdRequestParams' description: params required: true /contract/thresholds/availability: get: tags: - rest-threshold-controller summary: Check if user should have access to thresholds description: 'Return if user should have access to thresholds. Required privileges (one of the following):' operationId: getThresholdsAvailabilityUsingGET responses: '200': description: OK content: '*/*': schema: $ref: '#/components/schemas/OperationAvailability1' '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: [] /contract/thresholds/remove: post: tags: - rest-threshold-controller summary: Remove thresholds description: "If at least one item cannot be deleted, none of the items will be deleted.\n\n
The request is validated. Possible validation errors: \n| HTTP code | Error code | Description |\n|-----------|----------------------------|-----------------------------------------------------|\n| `404` | `REMOVING_BLOCKED` | Cannot remove at least one of threshold |\n| `404` | `THRESHOLD_NOT_FOUND` | Not an existing threshold was given in list |\nRequired privilege:" operationId: removeThresholdUsingPOST 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/RemoveThresholdParams' description: params required: true /contract/thresholds/{id}: get: tags: - rest-threshold-controller summary: Get threshold with information about operation availability description: "Returns a single threshold by `id` with additional information about possibility to modify and delete subscription.Accessible only if user has priviliges to perform these operations at all. \n\nRequired privilege:" operationId: getThresholdUsingGET parameters: - name: id in: path description: id required: true schema: type: integer format: int64 responses: '200': description: OK content: '*/*': schema: $ref: '#/components/schemas/ThresholdDetails' '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-threshold-controller summary: Modify existing threshold description: "Modifies existing threshold. Name must be unique in context of customer or the same as before.\n\n
The request is validated. Possible validation errors: \n| HTTP code | Error code | Description |\n|-----------|----------------------------|----------------------------------------------------------------------|\n| `400` | `VALUE_NOT_UNIQUE ` | `name` must be unique in context of customer or the same as before |\n| `400` | `TYPE_CHANGE_NOT_ALLOWED` | For chosen threshold change of type is not allowed |\n| `404` | `THRESHOLD_NOT_FOUND` | Not exisiting threshold was selected |\n\nRequired privilege:" operationId: updateThresholdUsingPOST 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/ThresholdRequestParams' description: params required: true /contract/thresholds/{id}/assign: post: tags: - rest-threshold-controller summary: Allows to assign list of contracts to given threshold description: "Assigne list of contracts to threshold.\n\nThe request is validated. Possible validation errors: \n\n| HTTP code | Error code | Description |\n|-----------|-------------------------------------------|------------------------------------------------------------------|\n| `400` | `CONTRACTS_ALREADY_ASSIGNED_TO_GIVEN_TYPE`| At least one contract is already assigned to this threshold type |\n| `400` | `NOT_VALID_PRODUCT_FOR_GIVEN_THRESHOLD` | At least one contract has not valid product for this threshold |\n| `403` | `FORBIDDEN_FOR_USER` | Thresholds are not available for loggin in user |\n| `404` | `CONTRACT_NOT_FOUND` | At least one contract is not visible for user or doesn't exist |\n| `404` | `THRESHOLD_NOT_FOUND` | Not exisiting threshold was selected |\nRequired privileges (one of the following):" operationId: assignContractsUsingPOST 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/AssignContractsToThresholdRequestParams' description: params required: true /contract/thresholds/{id}/unassign: post: tags: - rest-threshold-controller summary: Allows to unassign contracts from given threshold description: "Unassigns the given list of contracts from the given threshold.\n
The request is validated. Possible validation errors: \n| HTTP code | Error code | Description |\n|-----------|----------------------------|-----------------------------------------------------------------------------------------|\n| `403` | `FORBIDDEN_FOR_USER` | Thresholds are not available for loggin in user |\n| `404` | `THRESHOLD_NOT_FOUND` | Threshold with the given `id` was not found |\n| `404` | `CONTRACT_NOT_FOUND` | At least one of the given contracts does not exists or is not assigned to the threshold |\nRequired privileges (one of the following):" operationId: unassignContractsUsingPOST 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/UnassignContractsFromThresholdRequestParams' description: params required: true /contract/thresholds/{thresholdId}/contracts: get: tags: - rest-threshold-controller summary: Get contracts assigned to threshold description: "Possible validation errors: \n| HTTP code | Error code | Description |\n|-----------|----------------------------|----------------------------------------------------|\n| `404` | `THRESHOLD_NOT_FOUND` | Not an existing threshold was given in list |\n| `403` | `FORBIDDEN_FOR_USER` | Operation not allowed for current user |\n\nRequired privileges (one of the following):" operationId: getContractsUsingGET_1 parameters: - name: Content-Language in: header description: Content-Language required: false schema: type: string - name: category in: query required: false schema: type: string enum: - MOBILE - FIXED - FIXED_MOBILE - HARDWARE - SKYPE_FOR_BUSINESS - SOFTWARE - OTHER - name: filters in: query description: 'Possible columns: FIRSTNAME, LASTNAME, SURNAME_PREFIX, PRODUCT_NAME, PRODUCT_CATEGORY, MOBILE_NUMBER, FIXED_NUMBER, STATE, EXTENSION, SIM_CARD_NUMBER, IMEI. For example: FIRSTNAME: "aab", "aac"; LASTNAME: "aba", "abb"' required: false schema: type: string - 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: patterns in: query required: false style: form explode: true schema: type: array items: type: string - name: sortBy in: query required: false schema: type: string enum: - FIRSTNAME - LASTNAME - SURNAME_PREFIX - PRODUCT_NAME - PRODUCT_CATEGORY - MOBILE_NUMBER - FIXED_NUMBER - STATE - SIM_CARD_NUMBER - EXTENSION - SIP_ACCOUNT_NAME - CATEGORY - name: thresholdId in: path description: thresholdId 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_Contract_' '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: [] /contract/thresholds/{thresholdId}/contracts-to-assign: get: tags: - rest-threshold-controller summary: Get a list of contracts which can be later assigned to given threshold. description: "Possible validation errors: \n| HTTP code | Error code | Description |\n|-----------|----------------------------|-----------------------------------------------------|\n| `403` | `FORBIDDEN_FOR_USER` | Operation not allowed for current user |\n| `404` | `THRESHOLD_NOT_FOUND` | Given threshold can not be found |\n\nRequired privileges (one of the following):" operationId: getContractsToAssignUsingGET parameters: - name: Content-Language in: header description: Content-Language required: false schema: type: string - name: category in: query required: false schema: type: string enum: - MOBILE - FIXED - FIXED_MOBILE - HARDWARE - SKYPE_FOR_BUSINESS - SOFTWARE - OTHER - name: filters in: query description: 'Possible columns: FIRSTNAME, LASTNAME, SURNAME_PREFIX, PRODUCT_NAME, PRODUCT_CATEGORY, MOBILE_NUMBER, FIXED_NUMBER, STATE, EXTENSION, SIM_CARD_NUMBER, IMEI. For example: FIRSTNAME: "aab", "aac"; LASTNAME: "aba", "abb"' required: false schema: type: string - 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: patterns in: query required: false style: form explode: true schema: type: array items: type: string - name: sortBy in: query required: false schema: type: string enum: - FIRSTNAME - LASTNAME - SURNAME_PREFIX - PRODUCT_NAME - PRODUCT_CATEGORY - MOBILE_NUMBER - FIXED_NUMBER - STATE - SIM_CARD_NUMBER - EXTENSION - SIP_ACCOUNT_NAME - CATEGORY - name: thresholdId in: path description: thresholdId 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_Contract_' '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: [] 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 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 OperationAvailability1: type: object properties: blockingOrders: type: array items: $ref: '#/components/schemas/BlockingOrder' enabled: type: boolean visible: type: boolean title: OperationAvailability ThresholdRequestParams: type: object properties: dailyValue: type: number format: float name: type: string type: type: string enum: - VOICE_NATIONAL_MIN - VOICE_ROAMING_EUR - DATA_NATIONAL_MB - DATA_ROAMING_MB title: ThresholdRequestParams AssignContractsToThresholdRequestParams: type: object properties: contractsIds: type: array items: type: integer format: int64 title: AssignContractsToThresholdRequestParams UnassignContractsFromThresholdRequestParams: type: object properties: contractsIds: type: array items: type: integer format: int64 title: UnassignContractsFromThresholdRequestParams PagedResult_Contract_: type: object properties: result: type: array description: One page of result items: $ref: '#/components/schemas/Contract' total: type: integer format: int32 description: Total number of all elements in collection title: PagedResult_Contract_ description: Paged list of elements RemoveThresholdParams: type: object properties: thresholdIds: type: array items: type: integer format: int64 title: RemoveThresholdParams Threshold: type: object properties: dailyValue: type: number format: float id: type: integer format: int64 name: type: string type: type: string enum: - DATA_NATIONAL_MB - DATA_ROAMING_MB - VOICE_NATIONAL_MIN - VOICE_ROAMING_EUR title: Threshold OperationEnabled: type: object properties: blockingOrders: type: array items: $ref: '#/components/schemas/BlockingOrder' enabled: type: boolean title: OperationEnabled Contract: type: object properties: category: type: string extension: type: string firstName: type: string fixedNumber: type: string id: type: integer format: int64 imei: type: string lastName: type: string mobileNumber: type: string namePrefix: type: string product: $ref: '#/components/schemas/LocalizedString' productCategory: type: string simCardNumber: type: string sipAccount: type: string state: type: string enum: - ACTIVE - CLOSED - ORDERED - PENDING - BLOCKED title: Contract ThresholdDetails: type: object properties: changeType: $ref: '#/components/schemas/OperationEnabled' delete: $ref: '#/components/schemas/OperationEnabled' threshold: $ref: '#/components/schemas/Threshold' title: ThresholdDetails LocalizedString: type: object properties: en: type: string description: English version nl: type: string description: Dutch version title: LocalizedString description: Text with two language versions securitySchemes: OAuth2: type: oauth2 flows: clientCredentials: scopes: {} tokenUrl: https://api-prd.kpn.com/oauth/grip/msm/accesstoken?grant_type=client_credentials