openapi: 3.0.0
info:
  title: Change User PIN
  description: Changes the user's PIN.
paths:
  /api/rest:
    post:
      summary: changePin
      description: Changes the user's PIN based on the provided MSISDN and old PIN.
      operationId: changePin
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                access_token:
                  type: string
                  maxLength: 500
                  description: API Gateway access token
                  example: abc123token
                method:
                  type: string
                  maxLength: 64
                  description: API name
                  example: changePin
                version:
                  type: string
                  maxLength: 10
                  description: API version
                  example: '1.0'
                content:
                  type: object
                  description: Refer to content for details
                  properties:
                    msgId:
                      type: string
                      maxLength: 30
                      description: Unique message ID generated by third-party system.
                      example: '046202504231530300001'
                    channel:
                      type: string
                      maxLength: 20
                      description: Channel identifier.
                      example: UMB
                    msisdn:
                      type: string
                      description: MSISDN of the user.
                      example: '601112345678'
                    pin:
                      type: string
                      description: RSA encrypted old PIN.
                      example: <RSA_ENCRYPTED_PIN>
                    newPin:
                      type: string
                      description: RSA encrypted new PIN.
                      example: <RSA_ENCRYPTED_NEW_PIN>
              required:
                - access_token
                - method
                - version
                - content
      responses:
        '200':
          description: PIN change result
          content:
            application/json:
              schema:
                type: object
                properties:
                  res_code:
                    type: string
                    maxLength: 10
                    description: Response code
                    example: '00000'
                  res_message:
                    type: string
                    maxLength: 255
                    description: Response description
                    example: Operation success
                  result:
                    type: object
                    description: Validation result detail.
                    properties:
                      resultCode:
                        type: string
                        maxLength: 60
                        description: Result status code.
                        example: DBEP0000
                      resultMsg:
                        type: string
                        maxLength: 255
                        description: Result description.
                        example: Success
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_code:
                    type: string
                    description: Specific error code for the failure.
                  error_message:
                    type: string
                    description: Detailed error message.
        '500':
          description: Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_code:
                    type: string
                    description: Specific error code for the failure.
                  error_message:
                    type: string
                    description: Detailed error message.
components: {}
