# Bill fetch api

Endpoint: \
Request: POST /couapp/bills/fetch

#### Request body&#x20;

<table><thead><tr><th width="140">Parent Property/Element</th><th width="228">Property/Element Name</th><th width="121">Mandatory</th><th width="172">Data Type</th><th width="278">Description</th></tr></thead><tbody><tr><td>[ROOT] (No parent property / element)</td><td>tenantId</td><td>M</td><td>Alphanumeric</td><td>Fixed Length – 4</td></tr><tr><td></td><td>billerId</td><td>M</td><td>Alphanumeric</td><td>Unique ID assigned to the Biller by NPCI Eg: BSNL00000NATHL</td></tr><tr><td></td><td>billerName</td><td>M</td><td>String</td><td>Name of the biller</td></tr><tr><td></td><td>billerCategory</td><td>M</td><td>String</td><td>Category of biller</td></tr><tr><td></td><td>clientReqId</td><td>C</td><td>String</td><td>A unique id which the client has to provide</td></tr><tr><td></td><td>macAdress</td><td>C</td><td>Alphanumeric</td><td>MAC Address of the Agent Server</td></tr><tr><td></td><td>customerMobNo</td><td>M</td><td>String</td><td>Mobile of the Customer, on whose behalf the Agent is paying the Bill</td></tr><tr><td></td><td>paymentChannel</td><td>M</td><td>String</td><td>Payment Channel of Agent</td></tr><tr><td></td><td>deviceBlockTags</td><td>M</td><td>Array of tags</td><td>Device block tags of Agent</td></tr><tr><td></td><td>customerParamsRequest</td><td>M</td><td>Object</td><td>Unique parameters used for identifying a Customer Bill</td></tr><tr><td>customerParamsRequest</td><td>tags</td><td>M</td><td>List</td><td>List of customer params</td></tr><tr><td>tags</td><td>name</td><td>M</td><td>String</td><td>Name of customer param</td></tr><tr><td>tags</td><td>value</td><td>M</td><td>String</td><td>Value of customer param</td></tr></tbody></table>

<pre class="language-json"><code class="lang-json">{
    "tenantId": "FE41",
    "billerId": "DKAFEE000PUN01"
    "customerParamsRequest": {
        "tags": [
            {
                "name": "Admission No/Application No/GR No",
                "value": "LF3130"
            },
            {
                "name": "Date Of Birth (DD-MM-YYYY)"
            },
            {
                "name": "Mobile No"
            }
        ]
    },
    "billerName": "Little Flower Convent School",
    "billerCategory": "Education Fees",
    "macAdress": null,
    "customerMobNo": "8281970522”,
<strong>    "paymentChannel": "Agent",
</strong>    "deviceBlockTags": [
        {
            "name": "MOBILE",
            "value": "9591810218"
        },
        {
            "name": "GEOCODE",
            "value": "28.6139,78.5555"
        },
        {
            "name": "POSTAL_CODE",
            "value": "600001"
        },
        {
            "name": "TERMINAL_ID",
            "value": "333001"
        }
    ]
}
</code></pre>

#### Response body

<table><thead><tr><th width="236">Parent Property/Element</th><th width="221">Property/Element Name</th><th>Mandatory</th><th width="87">Data Type</th><th width="205">Description</th></tr></thead><tbody><tr><td>[ROOT] (No parent property / element)</td><td>billId</td><td>C</td><td>UUID</td><td>Machine-generated Unique ID for a Bill, used internally</td></tr><tr><td></td><td>refId</td><td>C</td><td>String</td><td>Will be null</td></tr><tr><td></td><td>billerId</td><td>C</td><td>String</td><td>Will be null</td></tr><tr><td></td><td>status</td><td>C</td><td>String</td><td>Will be null</td></tr><tr><td></td><td>actionType</td><td>C</td><td>String</td><td>Will be null</td></tr><tr><td></td><td>billerResponse</td><td>C</td><td>String</td><td>Will be null</td></tr><tr><td></td><td>additionalInfo</td><td>C</td><td>String</td><td>Will be null</td></tr><tr><td></td><td>customerParams</td><td>C</td><td>String</td><td>Will be null</td></tr><tr><td></td><td>creationDate</td><td>C</td><td>String</td><td>Will be null</td></tr><tr><td></td><td>modifiedDate</td><td>C</td><td>String</td><td>Will be null</td></tr><tr><td></td><td>createdEpochDate</td><td>C</td><td>String</td><td>Will be null</td></tr><tr><td></td><td>modifiedEpochDate</td><td>C</td><td>String</td><td>Will be null</td></tr><tr><td>generalResp</td><td>statusCode</td><td>M</td><td>Numeric</td><td>200- SUCCESS Other than 200-Failure</td></tr><tr><td></td><td>status</td><td>M</td><td>String</td><td>It is either “Success” or failure</td></tr><tr><td></td><td>message</td><td>M</td><td>String</td><td>Contains the reason message for failure / success</td></tr><tr><td></td><td>remarks</td><td>C</td><td>String</td><td></td></tr></tbody></table>

```json
{
    "genericResponse": {
        "statusCode": "200",
        "status": "success",
        "message": "Bill Fetch Initiated",
        "remarks": ""
    },
    "billId": "1ced7566-1add-4e01-9ed6-04cd67ac9684",
    "refId": null,
    "billerId": null,
    "status": null,
    "actionType": null,
    "userId": null,
    "billerResponse": null,
    "additionalInfo": null,
    "customerParams": null,
    "creationDate": null,
    "modifiedDate": null,
    "createdEpochDate": 0,
    "modifiedEpochDate": 0
}
```
