# Retrieve CWB Responses

<mark style="color:blue;">`GET`</mark> `{{baseurl}}/v2/api/v-forms/:templateId/responses`

#### Path Parameters

| Name                                         | Type   | Description |
| -------------------------------------------- | ------ | ----------- |
| templateId<mark style="color:red;">\*</mark> | String | template id |

#### Query Parameters

| Name           | Type   | Description                                                                                                                                                                     |
| -------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| page           | Number | Page number for pagination                                                                                                                                                      |
| limit          | Number | Limit of results to retrieve                                                                                                                                                    |
| startDate      | Date   | Filter Results by startDate, it requires a corresponding <mark style="color:red;">**`endDate`**</mark>. Both must be in <mark style="color:red;">**`YYYY-MM-DD`**</mark> format |
| endDate        | Date   | Filter Results by endDate, it requires a corresponding <mark style="color:red;">**`startDate`**</mark>. Both must be in <mark style="color:red;">**`YYYY-MM-DD`**</mark> format |
| verificationId | String | Get a response by Verification Id                                                                                                                                               |
| status         | String | Filter responses by status which can be <mark style="color:red;">**`cleared, not_cleared, pending, review_required, and pending_payment`**</mark>                               |

#### Headers

| Name                                    | Type   | Description      |
| --------------------------------------- | ------ | ---------------- |
| token<mark style="color:red;">\*</mark> | String | API secret token |

{% tabs %}
{% tab title="CWB Responses Sample Response" %}

```json
{
    "success": true,
    "statusCode": 200,
    "message": "Results retrieved",
    "data": {
        "docs": [
            {
                "_id": "6391dbfd3c70fd9bc72871af",
                "ipAddress": null,
                "status": "cleared",
                "createdAt": "2022-12-08T12:43:42.087Z",
                "firstName": "shittu",
                "lastName": "name",
                "photo": null
            },
            {
                "_id": "6391db312a5d2e9a5d916eb0",
                "ipAddress": null,
                "status": "cleared",
                "createdAt": "2022-12-08T12:40:18.370Z",
                "firstName": "test",
                "lastName": "me",
                "photo": null
            },
            {
                "_id": "6389c75079b317a51eeae48c",
                "ipAddress": null,
                "status": "cleared",
                "createdAt": "2022-12-02T09:37:20.610Z",
                "firstName": "me",
                "lastName": "shittu",
                "photo": null
            },
        ],
        "pagination": {
            "totalDocs": 3,
            "limit": 20,
            "page": 1,
            "totalPages": 1,
            "pagingCounter": 1,
            "hasPrevPage": false,
            "hasNextPage": false,
            "prevPage": null,
            "nextPage": null,
            "currentPage": 1,
            "perPage": 20,
            "serialNo": 1
        }
    },
    "links": []
}
```

{% endtab %}

{% tab title="Explanation" %}

<table><thead><tr><th width="147.33333333333331">Attribute</th><th width="129">Type</th><th>Description</th></tr></thead><tbody><tr><td>_id</td><td>String</td><td>vForm's object unique identifier.</td></tr><tr><td>ipAddress</td><td>String</td><td>This is the form filler's ipAddress.</td></tr><tr><td>firstname</td><td>String</td><td>This form filler's firstname</td></tr><tr><td>lastname</td><td>String</td><td>This form filler's lastname</td></tr><tr><td>createdAt</td><td>String(date)</td><td>The date this response was submitted.</td></tr><tr><td>status</td><td>String</td><td><p>This is the overall status of this response which can be anyone of the following </p><p><mark style="color:orange;"><code>"pending"</code></mark>: This is the overall status of a response when there is/are<br>still a/some verification(s) to be done on the response or when some responses are still expected from a reference form.<br><mark style="color:orange;"><code>"cleared"</code></mark>: This is the overall status of the response when a form with no<br>verification has been submitted or when all the verifications and validations have been performed by vform on a response and are all passed<br><mark style="color:orange;"><code>"not_cleared"</code></mark>: This is the overall status of the response when one or<br>more of the verifications and validations performed by vform on a response failed.<br><mark style="color:orange;"><code>"pending_payment"</code></mark>: </p></td></tr></tbody></table>
{% endtab %}
{% endtabs %}
