openapi: 3.0.0
info:
  title: Query eLoad Basic Info
  description: Retrieves basic account information of an agent.
paths:
  /api/rest:
    get:
      summary: queryeLoadBasicInfo
      description: Retrieves basic account information of an agent.
      operationId: queryeLoadBasicInfo
      parameters:
        - name: msgId
          in: query
          required: true
          schema:
            type: string
            maxLength: 30
          description: >
            Unique Message ID generated by 3rd party system.

            Format: [AAAYYYYMMDDHH24MISSCCCC]

            - AAA: Channel Identifier (3 digits), value to be provided by
            ZSmart.

            - Datetime: YYYYMMDDHH24MISS (Malaysia Time).

            - CCCC: Sequence number (4 digits), value range [0000-9999].
        - name: channel
          in: query
          required: true
          schema:
            type: string
            maxLength: 20
          description: Value to be provided upon request, fixed value for each channel.
        - name: orgCode
          in: query
          required: false
          schema:
            type: string
          description: |
            Organization Code.
            Mandatory when msisdn parameter is blank.
        - name: eloadNbr
          in: query
          required: false
          schema:
            type: string
          description: eLoad Number
          example: '10000001'
        - name: msisdn
          in: query
          required: false
          schema:
            type: string
          description: |
            Agent USSD MSISDN. Mandatory when orgCode parameter is blank.
          example: '601112345678'
      responses:
        '200':
          description: Basic account information
          content:
            application/json:
              schema:
                type: object
                properties:
                  res_code:
                    type: string
                    maxLength: 10
                    example: '00000'
                  res_message:
                    type: string
                    maxLength: 255
                    example: Operation success
                  result:
                    type: object
                    description: Response result details.
                    properties:
                      resultCode:
                        type: string
                        maxLength: 60
                        description: Service result code
                        example: DBEP0000
                      resultMsg:
                        type: string
                        maxLength: 255
                        description: Service result message
                        example: Success
                      msisdn:
                        type: string
                        description: Agent USSD MSISDN
                        example: '601112345678'
                      orgCode:
                        type: string
                        description: Organization Code
                      channel:
                        type: string
                        description: Channel name
                      channelType:
                        type: string
                        description: |
                          Channel Type Expected Value:
                          - Mass Distributor
                          - Mass Area Disty
                          - Mass Zone Disty
                          - Mass Premier Dealer
                          - Mass Premier Store
                          - Mass Dealer
                          - Mass Store
                          - Alternate Area Disty
                          - Alternate Distributor
                          - Alternate Dealer
                          - Alternate Store
                      busCode:
                        type: string
                        description: >-
                          Legacy business code for branch, migrated by migration
                          team.
                        example: BUS0000000014961
                      distyCode:
                        type: string
                        description: >-
                          SAP customer code of top-level channel (sync from
                          SAP).
                        example: '13875'
                      email:
                        type: string
                        description: Default account owner email address
                      region:
                        type: string
                        description: |
                          Region Expected Value:
                          - SOUTHERN
                          - EAST MSIA
                          - CENTRAL
                          - NORTHERN
                          - EASTERN
                      minAmount:
                        type: string
                        description: >-
                          Minimum transaction amount for the agent. Expected
                          Format 0.00
                      maxAmount:
                        type: string
                        description: >-
                          Maximum transaction amount for the agent. Expected
                          Format 0.00
                      minBalance:
                        type: string
                        description: >-
                          Minimum balance of default balance type of eLoad
                          account. Expected Format 0.00
                      maxBalance:
                        type: string
                        description: >-
                          Maximum balance of default balance type of eLoad
                          account. Expected Format 0.00
                      status:
                        type: string
                        description: |
                          Status of the agent:
                          - Active
                          - Inactive
                          - Terminated
                      balance:
                        type: string
                        description: Current balance of the agent. Expected Format 0.00
      x-validation-rules:
        - rule: If MSISDN passed in, MSISDN is USSD enabled.
          resultCode: DBEP0651
      x-error-codes:
        - code: DBEP0000
          message: Success
        - code: DBEP0651
          message: MSISDN is not USSD enabled.
        - code: DBEP9999
          message: Other errors.
components: {}
