> For the complete documentation index, see [llms.txt](https://docs.udara360.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.udara360.io/udara360-docs-1/bills-payments/bill-payments/search-bills.md).

# Search Bills

The "Search Bills" endpoint allows customers to search and filter previous bill payment transactions.

<mark style="color:green;">`GET`</mark> `/api/Bills/v1/Search`

To search for bill payment transactions, you can pass any combination of query parameters, such as `RequestingAccountNumber`, `PaymentReference`, `TransactionId`, and others, to narrow down the results.

**Headers**

| Name                                            | Value                |
| ----------------------------------------------- | -------------------- |
| Content-Type<mark style="color:red;">\*</mark>  | `application/json`   |
| Authorization<mark style="color:red;">\*</mark> | `Bearer`             |
| Request-Reference                               | `{unique_reference}` |

**Query Params**

| Name                      | Description                                                            |
| ------------------------- | ---------------------------------------------------------------------- |
| `RequestingAccountNumber` | Filters results to transactions made from a specific account number.   |
| `PaymentReference`        | Filters results to a specific payment reference.                       |
| `TransactionId`           | Filters results to a specific transaction ID.                          |
| `PostingReference`        | Filters results to a specific posting reference.                       |
| `StartDate`               | The start of the date range to filter results by.                      |
| `EndDate`                 | The end of the date range to filter results by.                        |
| `VendStatus`              | Filters results by the status of the vend transaction, e.g. CONFIRMED. |
| `CustomerId`              | Filters results to a specific customer's transactions.                 |

Here is an example request and response with a sample payload sent to the endpoint in Curl format.

<details>

<summary>Sample Request</summary>

```json
curl --location -g '{{baseurl}}/api/Bills/v1/Search?RequestingAccountNumber=1000001579&PaymentReference=&TransactionId=null&PostingRefernce=null&StartDate=null&EndDate=null&VendStatus=null&CustomerId=null' \
--header 'Authorization: bearer {token}' \
--header 'request-reference: {unique_reference}' \
--header 'Content-Type: application/json' \
--data ''
```

</details>

<details>

<summary>Response: <code>200</code></summary>

```json
{
  "status": true,
  "message": "string",
  "data": {
    "items": [
      {
        "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "dateCreated": "2024-11-13T01:24:38.272Z",
        "dateLastModified": "2024-11-13T01:24:38.272Z",
        "requestingAccountNumber": "string",
        "requestingAccountName": "string",
        "paymentReference": "string",
        "customerId": "string",
        "packageSlug": "string",
        "billerIdentifier": "string",
        "billType": "string",
        "channel": "string",
        "amount": 0,
        "feeCharged": 0,
        "cashBackApplied": 0,
        "customerName": "string",
        "packageName": "string",
        "transactionId": "string",
        "vendStatus": "string",
        "narration": "string",
        "postingResponseCode": "string",
        "postingResponseMessage": "string",
        "postingRefernce": "string",
        "aggregatorResponseCode": "string",
        "responseMessage": "string",
        "isTSQRequired": true,
        "date": "2024-11-13T01:24:38.272Z",
        "token": "string",
        "requireReversal": true,
        "isReversed": true,
        "dateReversed": "2024-11-13T01:24:38.272Z",
        "tsqTryCount": 0,
        "lastTSQCheck": "2024-11-13T01:24:38.272Z",
        "tokenUnits": 0
      }
    ],
    "recordCount": 0
  }
}
```

</details>
