# Add Multiple Monitor Record

{% hint style="danger" %}
Please note that exceeding the limit will result in failures when trying to create new records. Please ensure that the total number of Monitor records associated with a Worklist does not exceed the specified limit to avoid any potential issues
{% endhint %}

## Version 1

<mark style="color:green;">`PUT`</mark>` ``https://okaydbdemo.innov8tif.com/ekyc/api/aml/v3/worklists/{worklistId}/individuals?apiKey={apiKey}`

#### URL Parameters

| Field                                         | Remark                             |
| --------------------------------------------- | ---------------------------------- |
| worklistId <mark style="color:red;">\*</mark> | worklistId will be provided        |
| apiKey <mark style="color:red;">\*</mark>     | apiKey is used for authentication. |

#### Sample Request Body

```json
{
  "monitorRecords": [
    {
      "id": "1",
      "referenceId": "1",
      "name": "Donald John Trump",
      "addresses": [
        {
          "geography": "US",
          "city": "US"
        }
      ],
      "dob": "1970-08-22",
      "gender": "male"
    },
	{
      "id": "2",
      "referenceId": "2",
      "name": "Vladimir Putin",
      "addresses": [
        {
          "geography": "RU",
          "city": "RU"
        }
      ],
      "dob": "1970-08-22",
      "gender": "male"
    },
	{
      "id": "3",
      "referenceId": "3",
      "name": "Ahmad Hussain",
      "addresses": [
        {
          "geography": "SY",
          "city": "SY"
        }
      ],
      "dob": "1970-08-22",
      "gender": "male"
    }
  ]
}
```

#### Response Body

| Field       | Remark                                                                                                                                                                                                                                                                               |
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| status      | Indicate API status. Values can be success, error.                                                                                                                                                                                                                                   |
| messageCode | <p>Provide error details if status is "error". </p><p></p><p>Values can be: </p><ul><li>INVALID\_API\_KEY – invalid api key.</li><li>MAPI-004– Missing monitorRecords in json request</li><li>MAPI-213-monitorRecords cannot be duplicated ( duplicate Id in json request)</li></ul> |
| results     | JSON array contains detail response                                                                                                                                                                                                                                                  |

#### Sample Response Body

{% tabs %}
{% tab title="Success" %}

```json
{
    "status": "success",
    "messageCode": null,
    "message": null,
    "hasErrors": false,
    "results": [
        {
            "statusCode": 200,
            "referenceId": "1",
            "error": null
        },
        {
            "statusCode": 200,
            "referenceId": "2",
            "error": null
        },
        {
            "statusCode": 200,
            "referenceId": "3",
            "error": null
        }
    ]
}
```

{% endtab %}

{% tab title="Success (Missing Attribute ID)" %}

```json
{
    "status": "success",
    "messageCode": null,
    "message": null,
    "hasErrors": true,
    "results": [
        {
            "statusCode": 400,
            "referenceId": "1",
            "error": {
                "status": 0,
                "code": "MAPI-004",
                "message": "Missing attribute id",
                "errorDetails": null
            }
        },
        {
            "statusCode": 200,
            "referenceId": "2",
            "error": null
        },
        {
            "statusCode": 200,
            "referenceId": "3",
            "error": null
        }
    ]
}

```

{% endtab %}

{% tab title="Error (Authentication)" %}

```json
{
    "status": "error",
    "messageCode": ”INVALID_API_KEY”,
    "message": null
}
```

{% endtab %}

{% tab title="Error (Out of Limit)" %}

```json
{
    "status": "error",
    "messageCode": "MAPI-212",
    "message": "monitorRecords size should be in range 1-25",
    "hasErrors": false,
    "results": null
}
```

{% endtab %}
{% endtabs %}
