openapi: 3.0.3 info: description: | API to replace SIM of a Mobile Number. # Introduction This API lets API Consumers to replace SIM of a Mobile Number for their company mobile numbers. # API resources # Further info and support (FAQs will be added in a later version of the documentation) version: 1.0.0 title: SIM Replacement Service termsOfService: https://api.omantel.om/docs/terms/ contact: email: MiddlewareESB@omantel.om license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html externalDocs: description: Product documentation at https://developer.omantel.om/ url: https://developer.omantel.om/ servers: - url: https://apigwsb.omantel.om variables: apiRoot: default: https://apigwsb.omantel.om description: API root basePath: default: /sim-replacement-service/v1 description: Base path for the SIM Replacement Service tags: - name: SIM Replacement description: Operation to replace the SIM of a mobile number paths: /sim-replacement-service/v1/replace-sim: post: security: - oAuth2ClientCredentials: [] tags: - SIM Replacement summary: Allows companies to replace SIM of the number operationId: replaceSIM description: Replaces SIM and returns status of the order parameters: - name: mock-key in: query description: The mock-key parameter is used to simulate different response scenarios. Choose one of the available keys. **NOTE:- Mock keys are only applicable for sandbox environment and only give you mock responses.** required: true schema: type: string enum: - SIM-replacement-Service-post-200 - SIM-replacement-Service-post-401 - SIM-replacement-Service-post-403 - SIM-replacement-Service-post-404 - SIM-replacement-Service-post-500 - SIM-replacement-Service-post-503 - SIM-replacement-Service-post-504 - name: mobileNumber in: query description: | Mobile number with or without country code. This mobile number must be under API Consumer's company account. example: 9250xxxx required: true schema: type: string - name: newSIMSerialNumber in: query description: New SIM Serial Number. It must be unused SIM serial number example: 123456789012345678 required: true schema: type: string responses: 200: description: OK content: application/json: schema: type: object properties: orderId: type: string description: the order identifier can be used to track status example: "33753568" 401: $ref: "#/components/responses/Generic401" 403: $ref: "#/components/responses/Generic403" 404: $ref: "#/components/responses/Generic404" 500: $ref: "#/components/responses/Generic500" 503: $ref: "#/components/responses/Generic503" 504: $ref: "#/components/responses/Generic504" components: schemas: ErrorInfo: type: object required: - code - message - status properties: code: type: string description: Code given to this error status: type: string description: HTTP response status code message: type: string description: Detailed error description responses: Generic400: description: Invalid input content: application/json: schema: $ref: "#/components/schemas/ErrorInfo" example: code: INVALID_ARGUMENT status: 400 message: "Schema validation failed at ..." Generic401: description: Unauthorized content: application/json: schema: $ref: "#/components/schemas/ErrorInfo" example: code: UNAUTHORIZED status: 401 message: "Authorization failed: ..." Generic403: description: Forbidden content: application/json: schema: $ref: "#/components/schemas/ErrorInfo" example: code: FORBIDDEN status: 403 message: "Operation not allowed: ..." Generic404: description: Customer Not Found - check if specified mobile number is a valid Omantel customer content: application/json: schema: $ref: "#/components/schemas/ErrorInfo" example: code: NOT_FOUND status: 404 message: "The specified mobile number is not found" Generic500: description: Server error content: application/json: schema: $ref: "#/components/schemas/ErrorInfo" example: code: SERVER_ERROR status: 500 message: "Server Error" Generic503: description: Service unavailable content: application/json: schema: $ref: "#/components/schemas/ErrorInfo" example: code: SERVICE_UNAVAILABLE status: 503 message: "Service unavailable" Generic504: description: Request timeout exceeded content: application/json: schema: $ref: "#/components/schemas/ErrorInfo" example: code: REQUEST_TIMEOUT_EXCEEDED status: 504 message: "Request timeout exceeded" securitySchemes: oAuth2ClientCredentials: type: oauth2 flows: clientCredentials: tokenUrl: https://apigwsb.omantel.om/oauth2/accesstoken scopes: {}