# List

| **API URL**     | {{url}}/admin-service/program/list |
| --------------- | ---------------------------------- |
| **Method**      | POST                               |
| **Description** | Program List                       |

#### **Input 1:** <a href="#program-list-input1" id="program-list-input1"></a>

| **Field Name**        | **Type** | **Mandatory** | **Example**                                                                                                                                     |
| --------------------- | -------- | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| Authorization(Header) | String   | Yes           | Bearer eyJlbmMiOiJBMTI4R0NNIiwiYWxnIjoiUlNBLU9BRVAtMjU2In0.MCm0mJDfpfjlr10Uok79-kTF7fv9Tn7cI5m2WsRDGUd9VS7iRmfbszjuc1-w5D-PYt9CdVxRMGBQlzYauhnI |

#### **Sample Input 1:** <a href="#program-list-sampleinput1" id="program-list-sampleinput1"></a>

{

"limit":3,\
"tenantId":156,\
"searchTerm":""

}

#### **Output 1:** <a href="#program-list-output1" id="program-list-output1"></a>

| **Field Name** | **Type** | **Comments**     |
| -------------- | -------- | ---------------- |
| `id`           | Number   | Program id       |
| `name`         | String   | Program name     |
| `tenantId`     | Number   | Program tenantId |
| `active`       | String   | Program status   |

#### **Sample Output 1:** <a href="#program-list-sampleoutput1" id="program-list-sampleoutput1"></a>

```
{
    "message": "Got Program.",
    "entity": null,
    "status": true,
    "entityList": [
        {
            "id": 64,
            "name": "Heart",
            "tenantId": 156,
            "createdAt": "2023-02-28T14:56:26+05:30",
            "active": true
        },
        {
            "id": 57,
            "name": "KENPro",
            "tenantId": 156,
            "createdAt": "2023-02-24T17:57:57+05:30",
            "active": true
        },
        {
            "id": 38,
            "name": "Covid Camp",
            "tenantId": 156,
            "createdAt": "2023-02-17T14:49:06+05:30",
            "active": true
        }
    ],
    "responseCode": 200,
    "totalCount": 9
}
```

#### **Input 2:** <a href="#program-list-input2" id="program-list-input2"></a>

| **Field Name**        | **Type** | **Mandatory** | **Example**                                                                                                                                     |
| --------------------- | -------- | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| Authorization(Header) | String   | Yes           | Bearer eyJlbmMiOiJBMTI4R0NNIiwiYWxnIjoiUlNBLU9BRVAtMjU2In0.MCm0mJDfpfjlr10Uok79-kTF7fv9Tn7cI5m2WsRDGUd9VS7iRmfbszjuc1-w5D-PYt9CdVxRMGBQlzYauhnI |
| Search Name           | String   | No            | Medplus                                                                                                                                         |

#### **Sample Input 2:** <a href="#program-list-sampleinput2" id="program-list-sampleinput2"></a>

{\
"tenantId": "6",\
"country": "4",\
"limit": 10,\
"searchTerm": "Medplus"\
}

#### **Output 2:** <a href="#program-list-output2" id="program-list-output2"></a>

| **Field Name** | **Type** | **Comments**     |
| -------------- | -------- | ---------------- |
| `id`           | Number   | Program id       |
| `name`         | String   | Program name     |
| `tenantId`     | Number   | Program tenantId |
| `active`       | String   | Program status   |

#### **Sample Output 2:** <a href="#program-list-sampleoutput2" id="program-list-sampleoutput2"></a>

```
{
    "message": "Got Program.",
    "entity": null,
    "status": true,
    "entityList": [
        {
            "id": 5,
            "name": "Medplus",
            "tenantId": 6,
            "createdAt": "2023-03-08T22:23:16-08:00",
            "active": false
        }
    ],
    "responseCode": 200,
    "totalCount": 1
}
```
