> ## Documentation Index
> Fetch the complete documentation index at: https://developers.argosidentity.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Data Injection

> Data Injection is a method to update information for an existing submission via a separate path. This process replaces existing category data with new information.

## 1. Prerequisites

<Note>
  To perform an Injection, a submission must first be created via Liveform.
</Note>

## 2. Query String Options (Injection)

Additional information sent via Query Strings is included in the response data when calling the API. This enables the following functionalities:

* Generation of a unique user ID for KYC submitter identification.
* Addition of up to three custom fields.

## 3. Implementation Method

Query String options can be applied using the ARGOS ID Check Liveform. All Query String values must be URL-encoded.

## 4. URL Structure

* Basic Form URL: `https://form.argosidentity.com?pid={project_Id}`
* Injection URL: `https://form.argosidentity.com?pid={project_id}&action=addveri&sid={submission_id}`
* Injection URL with encryption: `https://form.argosidentity.com?pid={project_id}&encrypted={encrypted_values}`

<Warning>
  The Injection URL with encryption method are required to encrypt the sid and action parameters. 

  [https://form.argosidentity.com?pid=\{project\_id}\&encrypted=\{encrypted\_values}](https://form.argosidentity.com?pid=\{project_id}\&encrypted=\{encrypted_values}) (O)

  [https://form.argosidentity.com?pid=\{project\_id}\&action=addveri\&sid=\{submission\_id}\&encrypted=\{encrytped\_values}](https://form.argosidentity.com?pid=\{project_id}\&action=addveri\&sid=\{submission_id}\&encrypted=\{encrytped_values}) (X)

  (X) example functions similarly to an unencrypted addveri (Address Verification) action URL, ignore encrypted parameter options.
</Warning>

<Note>
  Please refer to this [link](https://developers.argosidentity.com/getting-started/en/encrypt-and-decrypt-data/overview) for encryption methods.
</Note>

### 4-1. Key Parameters

<ResponseField name="pid" type="string" required="true">
  Unique project identifier.
</ResponseField>

<ResponseField name="sid" type="string" required="true">
  Unique submission identifier. `sid` must also be encrypted in order to use any encrypted parameter.
</ResponseField>

<ResponseField name="action" type="string" required="true">
  Injection option action, use `addveri`. `action` must also be encrypted in order to use any encrypted parameter.
</ResponseField>

<ResponseField name="cf1" type="string">
  Custom option field #1.
</ResponseField>

<ResponseField name="cf2" type="string">
  Custom option field #2.
</ResponseField>

<ResponseField name="cf3" type="string">
  Custom option field #3.
</ResponseField>

<ResponseField name="userid" type="string">
  Must be encrypted. Custom unique user identifier.
</ResponseField>

<ResponseField name="ipRiskCategory" type="string">
  Must be encrypted. Set the risk for IP-based routing services. As of now, `vpn` ,`proxy` and `tor` parameters are supported. There is no space between the comma and the option name in each option. This option is paired with the `ipRiskDurationHours` option.
</ResponseField>

<ResponseField name="ipRiskDurationHours" type="int">
  Must be encrypted. Access can be directly restricted within a specified hour if the system determines that an IP address poses a risk. Risky IP addresses will be immediately blocked in set hours. It must be used with `ipRiskCategory`.
</ResponseField>

<ResponseField name="distanceCheckSource" type="string">
  Must be encrypted. The option to prevent users from continuing if their address is distant from their IP. Currently, `ipGeo` is only available. This option is paired with the `distanceMaxDistanceKm`.
</ResponseField>

<ResponseField name="distanceMaxDistanceKm" type="int">
  Must be encrypted. Can set a distance between the entered address and the IP-based address. If `distanceCheckSource` is set without `distanceMaxDistanceKm`, It must be used with `distanceCheckSource`.
</ResponseField>

<ResponseField name="blacklistCountries" type="bool">
  Must be encrypted. In order to forbid a country from being blacklisted in the dashboard, it must be set to true. The default value is false.
</ResponseField>

<Note>
  The address inputted in the injection is a concern for the blacklist countries.

  IP location and submitted country are not relevant.
</Note>

## 4-2. Responses to Rejection

| Rejection Code         | Description                                                            |
| ---------------------- | ---------------------------------------------------------------------- |
| `ipRisk_failCategory`  | Detection of selected ipRisk Categories.                               |
| `distanceChecks_ipGeo` | The distance exceeds the set killomiter, as indicated by ipGeo.        |
| `blackliskCountries`   | Unable to perform injection due to the presence of blacklistCountries. |

## 4-3. Error Responses

| Error Code                   | Description                                                      |
| ---------------------------- | ---------------------------------------------------------------- |
| `Invalid required`           | Missing required parameter.                                      |
| `Required field is missing`  | Missing one or more of the following: sid, pid, or address data. |
| `Invalid submissionId`       | The provided `sid` does not exist.                               |
| `Invalid projectId`          | The provided `pid` does not exist.                               |
| `Error in injecting address` | Undefined, unspecified error occurred during address injection.  |

## 5. Address Update Results

### 5-1-a. On Success

* Redirects to the results page.
* Displays the message: "Address verification completed."

### 5-1-b. On Success (Webhook)

Refer to [Data Injection of Webhook](https://developers.argosidentity.com/webhooks/en/idcheck-injection) section.

### 5-2-a. On Failure

* Redirects to an error page.
* `ipRiskCategory` that was applied and the risk that was detected, displays the message: "VPN/Proxy Detection, Please disable VPN or proxy and try again with a regular network connection."
* The applied `distanceCheckSource` and the distance is over than the specified distance in km, Displays the message: "Address Verification Failed, Please verify your address or try again on a network near your residence."
* If the process was unsuccessful, Displays the message: "An error occurred while processing the address information. Please try again." The user can then proceed with re-verification.

### 5-2-b. On Failure (Webhook)

There is no webhook for IP risk detection. However, if the distance check fails or a blacklist country is detected, a webhook will be generated. Reference the responses. Refer to [Data Injection of Webhook](https://developers.argosidentity.com/webhooks/en/idcheck-injection) section.

This guide helps you effectively utilize the Data Injection feature and Query String options in ID check to flexibly manage and customize the ID check process.
