openapi: 3.0.0
info:
  title: Perform eLoad Credit Transfer
  description: >-
    Initiates a synchronous eLoad credit transfer using the ZSmart protocol over
    HTTPS.
paths:
  /api/rest:
    post:
      summary: performeLoadTransfer
      description: >-
        Initiates a synchronous eLoad credit transfer from UMB/SAP systems using
        the ZSmart protocol over HTTPS.
      operationId: performeLoadTransfer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                access_token:
                  type: string
                  maxLength: 500
                  description: API Gateway access token
                method:
                  type: string
                  maxLength: 64
                  description: API name
                version:
                  type: string
                  maxLength: 10
                  description: API version
                content:
                  type: object
                  description: Refer to content for detail
                  properties:
                    msgId:
                      type: string
                      maxLength: 30
                      description: >
                        Unique Message ID generated by 3rd party system.

                        Format: [AAAYYYYMMDDHH24MISSCCCC]

                        - AAA: Channel Identifier (3 digits)

                        - Datetime: YYYYMMDDHH24MISS

                        - CCCC: Sequence number (4 digits), value range
                        [0000-9999].
                      example: UMR202503201230459999
                    channel:
                      type: string
                      maxLength: 20
                      description: >-
                        Value to be provided upon request, fixed value for each
                        channel.
                    fromMsisdn:
                      type: string
                      description: >-
                        Registered USSD MSISDN that eLoad account credit
                        transfer from.
                      example: '601112345678'
                    fromOrgCode:
                      type: string
                      description: Organization Code that incentive transfer from.
                    toMsisdn:
                      type: string
                      description: >-
                        Registered USSD MSISDN that eLoad account credit
                        transfer to.
                      example: '601112345678'
                    toOrgCode:
                      type: string
                      description: Organization Code that incentive transfer to.
                    toEloadNbr:
                      type: string
                      description: eLoad Number that credit transfer to.
                      example: '10000001'
                    walletType:
                      type: string
                      description: eLoad Account Wallet Type.
                      example: Main Wallet
                    userCode:
                      type: string
                      description: User ID used in ZSmart UPortal.
                    password:
                      type: string
                      description: >-
                        User password used in ZSmart UPortal. Must be RSA
                        encryption.
                    pin:
                      type: string
                      description: eLoad account owner pin number. Must be RSA encryption.
                    amount:
                      type: string
                      description: Transfer amount.
                      example: '0.00'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  res_code:
                    type: string
                    maxLength: 10
                    description: Response code, "00000" for success.
                    example: '00000'
                  res_message:
                    type: string
                    maxLength: 255
                    description: Response description.
                    example: Operation success
                  result:
                    type: object
                    description: Response result (optional).
                    properties:
                      resultCode:
                        type: string
                        maxLength: 60
                        description: Service result code.
                        example: DBEP0000
                      resultMsg:
                        type: string
                        maxLength: 255
                        description: Service result message.
                        example: Success
                      toOrgCode:
                        type: string
                        description: >-
                          Organization Code that eLoad account credit transfer
                          to.
                      toChannelType:
                        type: string
                        description: Channel Type that eLoad account credit transfer to.
                        example: Mass Dealer
                      txnNbr:
                        type: string
                        description: The transaction number generated by eLoad.
                      txnType:
                        type: string
                        description: Transaction Type.
                        example: Credit Transfer
                      amount:
                        type: string
                        description: Amount to be deducted.
                        example: '0.00'
                      txnTime:
                        type: string
                        description: Date and time of the transaction.
                        example: YYYY-MM-DD HH:MM:SS
                      eloadBeforeAmount:
                        type: string
                        description: The opening balance before transaction deducted.
                        example: '0.00'
                      eloadAfterAmount:
                        type: string
                        description: The closing balance after transaction deducted.
                        example: '0.00'
                      txnStatus:
                        type: string
                        description: Transaction status.
                        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.
        DBEP0000:
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_code:
                    type: string
                    description: Custom error code.
                    example: DBEP0000
                  error_message:
                    type: string
                    description: Custom error message.
                    example: Success
        DBEP0653:
          description: Source and destination channel must not be the same.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error_code:
                    type: string
                    description: Custom error code.
                    example: DBEP0653
                  error_message:
                    type: string
                    description: Custom error message.
                    example: Source and destination channel must not be the same.
components: {}
