openapi: 3.0.3 info: description: | This API allows API consumers to Credit Score of Omantel customers. # Introduction This API lets API Consumers to check Credit Score of the Omantel customers. Companies with B2B or B2B2C can use this API to check credit score and check if customers are eligible for purchaging Omantel devices on loan and/or installment. version: 1.0.0 title: Credit Score Checker API servers: - url: https://apigw.omantel.om variables: apiRoot: default: https://apigw.omantel.om description: API root basePath: default: /credit-score-checker/v1 description: Base path for the credit score API tags: - name: Credit Score Inquiry description: Operations to check Credit Score paths: /credit-score-checker/v1/credit-score/{mobileNumber}: get: security: - oAuth2ClientCredentials: [] tags: - Credit Score Inquiry summary: Get Credit Score of the customer operationId: getCreditScore description: Retrieve current credit score of the customer. parameters: - name: mobileNumber in: path description: Mobile number of Omantel customer with or without country code. example: 9250xxxx required: true schema: type: string responses: 200: description: OK content: application/json: schema: $ref: "#/components/schemas/CreditScore" 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: CreditScore: type: object required: - creditRating properties: creditRating: type: string enum: - "Red" - "Yellow" - "Green" - "Blue" - "Default - Red" - "Black" - "Grey" description: | Enumeration of credit rating, each represented by a color. - `Red` - Represents a red credit rating category. - `Yellow` - Represents a yellow credit rating category. - `Green` - Represents a green credit rating category. - `Blue` - Represents a blue credit rating category. - `Default - Red` - Represents the default credit rating category. - `Black` - Represents a black credit rating category. - `Grey` - Represents a grey credit rating category. creditThresh: type: number description: Credit threshold creditStatus: type: string description: Credit status 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" Generic409: description: Conflict content: application/json: schema: $ref: "#/components/schemas/ErrorInfo" example: status: 409 code: ALREADY_EXISTS message: "A specified resource duplicate entry 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://apigw.omantel.om/oauth2/accesstoken scopes: {}