> 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/cards/interswitch/searchcardaccount.md).

# SearchCardAccount

The "SearchCardAccount" endpoint allows customers to look up card-account link records in the Card Account data store using any combination of filters

<mark style="color:green;">`GET`</mark> `/api/Card/v{{version}}/Interswitch/SearchCardAccount`

{% hint style="info" %}
Pass only the field(s) you intend to search by, every query parameter is optional, and the endpoint filters on whatever combination you provide.
{% endhint %}

{% hint style="info" %}
&#x20;`MaskedPAN` must follow the platform's masking format: the first 6 and last 4 digits of the card, with nine asterisks (`*`) in between (e.g. `506136*********9443`).
{% endhint %}

To search for card accounts, you can pass any of the supported query parameters `AccountNumber`, `MaskedPAN`, `Status`, `CustomerId`, `StartDate`, `EndDate`, `PageNumber`, `PageSize` as needed.&#x20;

A successful request returns a paginated list of matching card-account records under `data`, each showing the account-side details (`accountNumber`, `nameOnCard`, `customerId`) alongside the full linked card profile in a nested `card` object, plus a `recordCount` showing the total number of matching records.

This endpoint streamlines the process of finding which account a card is linked to (or vice versa), letting you search across account-card links in a single call rather than cross-referencing separate account and card lookups.

**Headers**

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

**Query Params**

| Name            | Description                                                                                          |
| --------------- | ---------------------------------------------------------------------------------------------------- |
| `AccountNumber` | The account number to search by. Optional.                                                           |
| `MaskedPAN`     | The card's masked PAN to search by (first 6 and last 4 digits, nine asterisks in between). Optional. |
| `Status`        | The link status to filter by (e.g. Linked). Optional.                                                |
| `CustomerId`    | The customer ID to filter by. Optional.                                                              |
| `StartDate`     | The start of the date range to filter by. Optional.                                                  |
| `EndDate`       | The end of the date range to filter by. Optional.                                                    |
| `PageNumber`    | The page number to retrieve. Optional.                                                               |
| `PageSize`      | The number of records to return per page. Optional.                                                  |

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/Card/v{{version}}/Interswitch/SearchCardAccount?AccountNumber=1700263070&MaskedPAN=506136*********9443&Status=Linked&CustomerId=10029001&StartDate=2023-03-26&EndDate=2023-03-28&PageNumber=1&PageSize=10' \
--header 'Content-Type: application/json'
```

</details>

<details>

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

```json
{
  "status": true,
  "message": "string",
  "data": {
    "data": [
      {
        "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "dateCreated": "2025-03-31T13:55:54.140Z",
        "dateLastModified": "2025-03-31T13:55:54.140Z",
        "accountNumber": "string",
        "nameOnCard": "string",
        "customerId": "string",
        "cardId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "card": {
          "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
          "dateCreated": "2025-03-31T13:55:54.140Z",
          "dateLastModified": "2025-03-31T13:55:54.140Z",
          "batchNo": "string",
          "maskedPan": "string",
          "encrptedPan": "string",
          "hashedPan": "string",
          "accountNumber": "string",
          "nameOnCard": "string",
          "serialNumber": "string",
          "expiryDate": "2025-03-31T13:55:54.140Z",
          "requestDate": "2025-03-31T13:55:54.140Z",
          "issuedDate": "2025-03-31T13:55:54.140Z",
          "issuanceStatus": "string",
          "cardProfileId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
          "cardType": "string",
          "cardScheme": "string",
          "status": "string",
          "isATMEnabled": true,
          "isPOSEnabled": true,
          "isWebEnabled": true,
          "cardFileLink": "string"
        },
        "bankCode": "string",
        "encrptedPan": "string",
        "hashedPan": "string",
        "overrideProductApplicableFee": true,
        "overrideProductApplicableInterest": true,
        "productCode": "string",
        "productName": "string",
        "signatureFileUrl": "string",
        "passportFileUrl": "string",
        "status": "string"
      }
    ],
    "recordCount": 0
  }
}
```

</details>
