# Add Consumer Number

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /api/v0/biller/fetchOrAddBill:
    post:
      summary: Add Consumer Number
      deprecated: false
      description: >-
        This API is used to fetch an existing bill or register a new consumer
        number for a specific biller. It validates the provided customer details
        and retrieves the latest bill information from the biller system.


        If the consumer number is not already registered in the system, it will
        be added and linked to the corresponding biller for future transactions
      tags:
        - Bharat Connect (BBPS)/APIs - BBPS/Bill Payment/Consumer Number Apis
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                billerId:
                  type: integer
                  description: >-
                    Unique identifier of the biller, received from the Biller
                    List API.
                billParams:
                  type: object
                  properties:
                    cn:
                      type: string
                      description: >-
                        Customer Number / Consumer Number as registered with the
                        biller. Parameter cn in biller List Api
                    ad1:
                      type: string
                      description: >-
                        Additional parameter 1 required by the biller (if
                        applicable). Parameter ad1 in biller List Api
                    ad2:
                      type: string
                      description: >-
                        Additional parameter 2 required by the biller (if
                        applicable). Parameter ad2 in biller List Api
                    ad3:
                      type: string
                      description: >-
                        Additional parameter 3 required by the biller (if
                        applicable). Parameter ad3 in biller List Api
                  required:
                    - cn
                  x-apidog-orders:
                    - cn
                    - ad1
                    - ad2
                    - ad3
                  description: >-
                    Object containing customer and billing-related parameters
                    required to process the bill request.
                branchCode:
                  type: string
                  description: >-
                    Branch code to be associated with the biller or customer
                    account. Mandatory if branches are enabled.
                remarks:
                  type: string
                  description: >-
                    Remarks or description, used for internal tracking or
                    reference.
                keyContactEmail:
                  type: string
                  description: >-
                    Email address of the contact person to whom bill related
                    emails to be triggered. Multiple emails can be shared comma
                    separated.
                circle:
                  type: string
                  description: Circle value if applicable for the biller.
                  enum:
                    - AP
                    - ASM
                    - BIH
                    - CHE
                    - DEL
                    - GUJ
                    - HAR
                    - HP
                    - JK
                    - KK
                    - KER
                    - KOL
                    - MAH
                    - MP
                    - MUM
                    - NE
                    - ORI
                    - PUN
                    - RAJ
                    - TN
                    - UPE
                    - UPW
                    - WB
                    - ALL
                    - AGRA
                    - AHM
                    - BHIWANDI
                    - SURAT
                    - SHILMUMBRAKALWA
                  x-apidog-enum:
                    - value: AP
                      name: ''
                      description: ''
                    - value: ASM
                      name: ''
                      description: ''
                    - value: BIH
                      name: ''
                      description: ''
                    - value: CHE
                      name: ''
                      description: ''
                    - value: DEL
                      name: ''
                      description: ''
                    - value: GUJ
                      name: ''
                      description: ''
                    - value: HAR
                      name: ''
                      description: ''
                    - value: HP
                      name: ''
                      description: ''
                    - value: JK
                      name: ''
                      description: ''
                    - value: KK
                      name: ''
                      description: ''
                    - value: KER
                      name: ''
                      description: ''
                    - value: KOL
                      name: ''
                      description: ''
                    - value: MAH
                      name: ''
                      description: ''
                    - value: MP
                      name: ''
                      description: ''
                    - value: MUM
                      name: ''
                      description: ''
                    - value: NE
                      name: ''
                      description: ''
                    - value: ORI
                      name: ''
                      description: ''
                    - value: PUN
                      name: ''
                      description: ''
                    - value: RAJ
                      name: ''
                      description: ''
                    - value: TN
                      name: ''
                      description: ''
                    - value: UPE
                      name: ''
                      description: ''
                    - value: UPW
                      name: ''
                      description: ''
                    - value: WB
                      name: ''
                      description: ''
                    - value: ALL
                      name: ''
                      description: ''
                    - value: AGRA
                      name: ''
                      description: ''
                    - value: AHM
                      name: ''
                      description: ''
                    - value: BHIWANDI
                      name: ''
                      description: ''
                    - value: SURAT
                      name: ''
                      description: ''
                    - value: SHILMUMBRAKALWA
                      name: ''
                      description: ''
              required:
                - billerId
                - billParams
                - branchCode
              x-apidog-orders:
                - billerId
                - billParams
                - circle
                - branchCode
                - remarks
                - keyContactEmail
              description: Request payload for biller operation containing biller details.
            examples:
              '1':
                value:
                  billerId: 10
                  billParams:
                    cn: '3432423423'
                    ad1: '8503928642'
                  branchCode: CBC865522HQTM
                  remarks: Add CA in Pune branch
                  keyContactEmail: shreshth.khandelwal@enkash.com
                summary: Add CA number with 1 additional Param
              '2':
                value:
                  billerId: 4
                  billParams:
                    cn: '3432423423'
                  branchCode: CBC865522HQTM
                  remarks: CA Addition
                  keyContactEmail: shreshth.khandelwal@enkash.com,xyz@enkash.com
                summary: Add CA number with multiple key contact Email
              '3':
                value:
                  billerId: 12
                  billParams:
                    cn: '3432423423'
                    ad1: '8503928642'
                  cicrle: AP
                  branchCode: CBC865522HQTM
                  remarks: Add CA in Pune branch
                  keyContactEmail: shreshth.khandelwal@enkash.com
                summary: Add CA number with circle field
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  response_code:
                    type: integer
                    description: >-
                      Numeric status code indicating the result of the API
                      request
                  response_message:
                    type: string
                    description: Message describing the outcome of the API request.
                  payload:
                    type: object
                    properties:
                      companyBillerId:
                        type: string
                        description: >-
                          Unique identifier of the consumer number in the
                          system.
                      billNumber:
                        type: string
                        description: Latest Bill Number if received from the billler
                      userName:
                        type: string
                        description: Consumer name if received from the biller
                      billAmount:
                        type: integer
                        description: Latest Bill Amount if received from the biller
                      dueDate:
                        type: string
                        description: Latest Due Date if received from the biller
                      billPeriod:
                        type: string
                        description: Latest Bill Period if received from the biller
                      billnetamount:
                        type: integer
                        description: Latest Bill net Amount if received from the biller
                      earlyPaymentAmount:
                        type: integer
                        description: >-
                          Latest Early Payment Amount if received from the
                          biller
                      latePaymentAmount:
                        type: integer
                        description: Late Payment Amount if received from the biller
                      actualDueDate:
                        type: string
                        description: Actual Due Date if received from the biller
                      statusMessage:
                        type: string
                        description: Response reason if any received from the biller
                      billParams:
                        type: object
                        properties:
                          cn:
                            type: string
                          ad1:
                            type: string
                          ad2:
                            type: string
                          ad3:
                            type: string
                        required:
                          - cn
                        x-apidog-orders:
                          - cn
                          - ad1
                          - ad2
                          - ad3
                        description: >-
                          Input params as entered while creating the consumer
                          number
                      additionalInfo:
                        type: object
                        properties: {}
                        x-apidog-orders: []
                        description: >-
                          Additional CA number information if received from
                          biller. Optional object containing biller-specific or
                          dynamic additional metadata not covered in standard
                          fields.
                    required:
                      - companyBillerId
                      - billParams
                    x-apidog-orders:
                      - companyBillerId
                      - billNumber
                      - userName
                      - billAmount
                      - dueDate
                      - billPeriod
                      - billnetamount
                      - earlyPaymentAmount
                      - latePaymentAmount
                      - actualDueDate
                      - statusMessage
                      - billParams
                      - additionalInfo
                required:
                  - response_code
                  - response_message
                  - payload
                x-apidog-orders:
                  - response_code
                  - response_message
                  - payload
              examples:
                '1':
                  summary: Success
                  value:
                    response_code: 0
                    response_message: Success
                    payload:
                      companyBillerId: CB579708053FS
                      billNumber: '559515'
                      userName: Shreshth Khandelwal
                      billAmount: 110
                      dueDate: '2025-09-09'
                      billPeriod: '1.03'
                      billnetamount: 120
                      earlyPaymentAmount: 100
                      latePaymentAmount: 120
                      actualDueDate: '2025-09-09'
                      statusMessage: ''
                      billParams:
                        cn: '453432254354'
                      additionalInfo:
                        Early Payment Date: '2025-09-07'
                        PC: '1'
                        Disconn Tag: '0'
                        Bill Month: '2501'
                        DTC Code: '4688962'
                '2':
                  summary: Success
                  value:
                    response_code: 0
                    response_message: Success
                    payload:
                      companyBillerId: CB579708053FS
                      statusMessage: no bill due
                      billParams:
                        cn: '453432254354'
                '3':
                  summary: Failure
                  value:
                    response_code: 1
                    response_message: Please enter valid 12 Digit Consumer No
                    payload: Please enter valid 12 Digit Consumer No
                '4':
                  summary: Failure
                  value:
                    response_code: 1
                    response_message: Invalid branchCode in request
                    payload: Invalid branchCode in request
                '5':
                  summary: Failure
                  value:
                    response_code: 1
                    response_message: no Biller found
                    payload: no Biller found
                '6':
                  summary: Failure
                  value:
                    response_code: 1
                    response_message: Branch Code not added
                    payload: Branch Code not added
          headers: {}
          x-apidog-name: Success
      security:
        - bearer: []
      x-apidog-folder: Bharat Connect (BBPS)/APIs - BBPS/Bill Payment/Consumer Number Apis
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/616243/apis/api-29257425-run
components:
  schemas: {}
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
servers:
  - url: https://ekpayout-uat.enkash.in
    description: Testing Env
security: []

```
