# Transaction Monitoring Results
> Transaction Monitoring Result helps you demonstrate that your program is compliant with the bank's expectations for transaction monitoring. After you submit a transaction to your transaction monitoring system or it triggers alerts, you should create a result record in Increase.

## The Transaction Monitoring Result object
### Example
```json
{
  "alert": null,
  "category": "monitor",
  "created_at": "2020-01-31T23:59:59Z",
  "declined_transaction_id": null,
  "id": "transaction_monitoring_result_2xw97hvcep0qzbihasv",
  "idempotency_key": null,
  "monitor": {
    "monitored_at": "2020-01-31T23:59:59Z",
    "reference": "1234567890"
  },
  "suspicious_activity": null,
  "transaction_id": "transaction_uyrp7fld2ium70oa7oi",
  "type": "transaction_monitoring_result",
  "vendor": "oscilar"
}
```
### Attributes
- `alert` (dictionary, nullable)
  Details of the alert to create. Required if `category` is equal to `alert`.

  - `alert.alerted_at` (string)
    The date and time when your monitoring system triggered an alert for this transaction.

  - `alert.reference` (string)
    The identifier generated by the monitoring system and returned to you for this alert.

- `category` (enum)
  The category of the result your monitoring system produced.
  Cases:
  * `monitor` (Evidence that the transaction was monitored.)
  * `alert` (Evidence that the transaction triggered an alert.)
  * `suspicious_activity` (Evidence that the transaction produced a suspicious activity filing.)

- `created_at` (string)
  When this information record was submitted to Increase.

- `declined_transaction_id` (string, nullable)
  The identifier of the Declined Transaction that was submitted to your monitoring system.

- `id` (string)
  The unique identifier for the Transaction Monitoring Result.

- `idempotency_key` (string, nullable)
  The idempotency key you chose for this object. This value is unique across Increase and is used to ensure that a request is only processed once. Learn more about [idempotency](https://increase.com/documentation/idempotency-keys).

- `monitor` (dictionary, nullable)
  Details of the monitor to create. Required if `category` is equal to `monitor`.

  - `monitor.monitored_at` (string)
    The date and time when you submitted the transaction to your monitoring system.

  - `monitor.reference` (string)
    The identifier generated by the monitoring system and returned to you when your transaction was submitted for monitoring. This identifier, which might be sampled by the bank, demonstrates that the transaction was submitted to your monitoring system.

- `suspicious_activity` (dictionary, nullable)
  Details of the suspicious activity to create. Required if `category` is equal to `suspicious_activity`.

  - `suspicious_activity.detected_at` (string)
    The date and time when your monitoring system detected suspicious activity for this transaction.

  - `suspicious_activity.reference` (string)
    The identifier generated by the monitoring system and returned to you for a suspicious activity.

  - `suspicious_activity.report` (dictionary, nullable)
    Details for a report if one was filed for the suspicious activity.

      - `suspicious_activity.report.filed_at` (string)
        The date and time when a report was filed for this suspicious activity.

      - `suspicious_activity.report.reference` (string)
        The identifier generated by the monitoring system and returned to you if a report was filed.

- `transaction_id` (string, nullable)
  The identifier of the Transaction that was submitted to your monitoring system.

- `type` (string)
  A constant representing the object's type. For this resource it will always be `transaction_monitoring_result`.

- `vendor` (enum)
  The monitoring system that you used for transaction monitoring.
  Cases:
  * `oscilar` (Oscilar)
  * `unit_21` (Unit 21)
  * `sardine` (Sardine)
  * `comply_advantage` (ComplyAdvantage)

## List Transaction Monitoring Results
GET /transaction_monitoring_results

### Example
```curl
curl \
  --url "${INCREASE_URL}/transaction_monitoring_results" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}"
```

### Query Parameters
- `cursor` (string, optional)
  Return the page of entries after this one.

- `limit` (integer, optional)
  Limit the size of the list that is returned. The default (and maximum) is 100 objects.

- `idempotency_key` (string, optional)
  Filter records to the one with the specified `idempotency_key` you chose for that object. This value is unique across Increase and is used to ensure that a request is only processed once. Learn more about [idempotency](https://increase.com/documentation/idempotency-keys).

### Returns a Transaction Monitoring Result List object:
```json
{
  "data": [
    {
      "alert": null,
      "category": "monitor",
      "created_at": "2020-01-31T23:59:59Z",
      "declined_transaction_id": null,
      "id": "transaction_monitoring_result_2xw97hvcep0qzbihasv",
      "idempotency_key": null,
      "monitor": {
        "monitored_at": "2020-01-31T23:59:59Z",
        "reference": "1234567890"
      },
      "suspicious_activity": null,
      "transaction_id": "transaction_uyrp7fld2ium70oa7oi",
      "type": "transaction_monitoring_result",
      "vendor": "oscilar"
    }
  ],
  "next_cursor": "v57w5d"
}
```

## Create a Transaction Monitoring Result
POST /transaction_monitoring_results
> Call this endpoint to create a Transaction Monitoring Result for each relevant transaction. The evidence records will be correlated against processed transactions to ensure that your monitoring system is working as expected.
### Example
```curl
curl -X "POST" \
  --url "${INCREASE_URL}/transaction_monitoring_results" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}" \
  -H "Content-Type: application/json" \
  -d $'{
    "alert": null,
    "category": "monitor",
    "declined_transaction_id": null,
    "monitor": {
      "monitored_at": "2020-01-31T23:59:59Z",
      "reference": "1234567890"
    },
    "suspicious_activity": null,
    "transaction_id": "transaction_uyrp7fld2ium70oa7oi",
    "vendor": "oscilar"
  }'
```

### Body Parameters
- `alert` (dictionary, optional)
  Details of the alert to create. Required if `category` is equal to `alert`.

  - `alert.alerted_at` (string, required)
    The date and time when your monitoring system triggered an alert for this transaction.

  - `alert.reference` (string, required)
    The identifier generated by the monitoring system and returned to you for this alert.

- `category` (enum, required)
  The category of the result your monitoring system produced.
  Cases:
  * `monitor` (Evidence that the transaction was monitored.)
  * `alert` (Evidence that the transaction triggered an alert.)
  * `suspicious_activity` (Evidence that the transaction produced a suspicious activity filing.)

- `declined_transaction_id` (string, optional)
  The Transaction that was submitted to your monitoring system.

- `monitor` (dictionary, optional)
  Details of the monitor to create. Required if `category` is equal to `monitor`.

  - `monitor.monitored_at` (string, required)
    The date and time when you submitted the transaction to your monitoring system.

  - `monitor.reference` (string, required)
    The identifier generated by the monitoring system and returned to you when your transaction was submitted for monitoring. This identifier, which might be sampled by the bank, demonstrates that the transaction was submitted to your monitoring system.

- `suspicious_activity` (dictionary, optional)
  Details of the suspicious activity to create. Required if `category` is equal to `suspicious_activity`.

  - `suspicious_activity.detected_at` (string, required)
    The date and time when your monitoring system detected suspicious activity for this transaction.

  - `suspicious_activity.reference` (string, required)
    The identifier generated by the monitoring system and returned to you for a suspicious activity.

  - `suspicious_activity.report` (dictionary, optional)
    Details for a report if one was filed for the suspicious activity.

      - `suspicious_activity.report.filed_at` (string, required)
        The date and time when a report was filed for this suspicious activity.

      - `suspicious_activity.report.reference` (string, required)
        The identifier generated by the monitoring system and returned to you if a report was filed.'

- `transaction_id` (string, optional)
  The Transaction that was submitted to your monitoring system.

- `vendor` (enum, required)
  The vendor of your monitoring system.
  Cases:
  * `oscilar` (Oscilar)
  * `unit_21` (Unit 21)
  * `sardine` (Sardine)
  * `comply_advantage` (ComplyAdvantage)

## Retrieve a Transaction Monitoring Result
GET /transaction_monitoring_results/{transaction_monitoring_result_id}

### Example
```curl
curl \
  --url "${INCREASE_URL}/transaction_monitoring_results/transaction_monitoring_result_2xw97hvcep0qzbihasv" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}"
```
### Path Parameters
- `transaction_monitoring_result_id` (string, required)
  The identifier of the Transaction Monitoring Result to retrieve.