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

# Using Registration Parameters

> Use registration parameters in ABBYY Vantage to pass key-value metadata with API transactions for filtering, reporting, and custom processing.

## Using Registration Parameters

Transaction and file registration parameters are parameters consisting of key-value string pairs designed to provide additional user information (for example, client name, document type, and file source information). They are passed for processing along the transaction or the transaction documents. These parameters are available to all workers and can be used in various production scenarios:

* A program that uses ABBYY Vantage signs every transaction using an end-client attribute for the purposes of compiling reports and creating custom processing procedures (e.g. filtering counterparty data catalogs by client).
* A Scanning Station client (or a different origin for transactions) can pass the registration parameters of a document batch (such as an external correlation ID).

Registration parameters can be set using the Vantage API:

1. When creating an empty transaction or when initializing a transaction using the `launch` method. To do so, send a POST request to the `transactions` resource like in the example below:

<CodeGroup>
  ```text US theme={null}
  POST https://vantage-us.abbyy.com/api/publicapi/v1/transactions
  ```

  ```text EU theme={null}
  POST https://vantage-eu.abbyy.com/api/publicapi/v1/transactions
  ```

  ```text AU theme={null}
  POST https://vantage-au.abbyy.com/api/publicapi/v1/transactions
  ```
</CodeGroup>

or

<CodeGroup>
  ```text US theme={null}
  POST https://vantage-us.abbyy.com/api/publicapi/v1/transactions/launch?skillId=skill-id
  ```

  ```text EU theme={null}
  POST https://vantage-eu.abbyy.com/api/publicapi/v1/transactions/launch?skillId=skill-id
  ```

  ```text AU theme={null}
  POST https://vantage-au.abbyy.com/api/publicapi/v1/transactions/launch?skillId=skill-id
  ```
</CodeGroup>

In the request body, specify the registration parameters and run the following command:

<CodeGroup>
  ```bash US theme={null}
  curl -X POST "https://vantage-us.abbyy.com/api/publicapi/v1/transactions" \
  -H "Authorization: Bearer token" \
  -H "Content-Type: application/json" \
  -d "{
    \"skillId\": \"123\",
    \"registrationParameters\": [
      {
        \"key\": \"key1\",
        \"value\": \"value1\"
      }
    ]
  }"
  ```

  ```bash EU theme={null}
  curl -X POST "https://vantage-eu.abbyy.com/api/publicapi/v1/transactions" \
  -H "Authorization: Bearer token" \
  -H "Content-Type: application/json" \
  -d "{
    \"skillId\": \"123\",
    \"registrationParameters\": [
      {
        \"key\": \"key1\",
        \"value\": \"value1\"
      }
    ]
  }"
  ```

  ```bash AU theme={null}
  curl -X POST "https://vantage-au.abbyy.com/api/publicapi/v1/transactions" \
  -H "Authorization: Bearer token" \
  -H "Content-Type: application/json" \
  -d "{
    \"skillId\": \"123\",
    \"registrationParameters\": [
      {
        \"key\": \"key1\",
        \"value\": \"value1\"
      }
    ]
  }"
  ```
</CodeGroup>

2. When uploading files to a transaction or a document. To do so, send a POST request to the `transactions/<transaction-id>/files` resource like in the example below:

<CodeGroup>
  ```text US theme={null}
  POST https://vantage-us.abbyy.com/api/publicapi/v1/transactions/transaction-id/files/
  ```

  ```text EU theme={null}
  POST https://vantage-eu.abbyy.com/api/publicapi/v1/transactions/transaction-id/files/
  ```

  ```text AU theme={null}
  POST https://vantage-au.abbyy.com/api/publicapi/v1/transactions/transaction-id/files/
  ```
</CodeGroup>

In the request body, specify the registration parameters and run the following command:

<CodeGroup>
  ```bash US theme={null}
  curl -X POST "https://vantage-us.abbyy.com/api/publicapi/v1/transactions/transaction-id/files/" \
  -H "Authorization: Bearer token" \
  -F "Files=@Invoice07.jpg; type=image/jpeg" \
  -F 'Model={
    "files": [
      {
        "index": 0,
        "imageProcessingOptions": {
          "autoCrop": "Default",
          "autoOrientation": "Default"
        },
        "registrationParameters": [
          {
            "key": "key1",
            "value": "value1"
          }
        ]
      }
    ]
  }'
  ```

  ```bash EU theme={null}
  curl -X POST "https://vantage-eu.abbyy.com/api/publicapi/v1/transactions/transaction-id/files/" \
  -H "Authorization: Bearer token" \
  -F "Files=@Invoice07.jpg; type=image/jpeg" \
  -F 'Model={
    "files": [
      {
        "index": 0,
        "imageProcessingOptions": {
          "autoCrop": "Default",
          "autoOrientation": "Default"
        },
        "registrationParameters": [
          {
            "key": "key1",
            "value": "value1"
          }
        ]
      }
    ]
  }'
  ```

  ```bash AU theme={null}
  curl -X POST "https://vantage-au.abbyy.com/api/publicapi/v1/transactions/transaction-id/files/" \
  -H "Authorization: Bearer token" \
  -F "Files=@Invoice07.jpg; type=image/jpeg" \
  -F 'Model={
    "files": [
      {
        "index": 0,
        "imageProcessingOptions": {
          "autoCrop": "Default",
          "autoOrientation": "Default"
        },
        "registrationParameters": [
          {
            "key": "key1",
            "value": "value1"
          }
        ]
      }
    ]
  }'
  ```
</CodeGroup>

<Warning>
  There can be a maximum of 10 key-value type parameters, with the key parameter containing up to 128 characters and the value parameter containing up to 256 characters. The values of these parameters cannot be changed once they have been set.
</Warning>

Registration parameter values can be read:

* in Custom activity scripts,
* in External Export scripts in Output activity,
* in business rules.

You can get registration parameter values using the Vantage API as follows:

1. By calling the `registrationParameters` method for the `transactions/<transaction-id>/registrationParameters` resource:

<CodeGroup>
  ```text US theme={null}
  GET https://vantage-us.abbyy.com/api/publicapi/v1/transactions/transaction-id/registrationParameters/
  ```

  ```text EU theme={null}
  GET https://vantage-eu.abbyy.com/api/publicapi/v1/transactions/transaction-id/registrationParameters/
  ```

  ```text AU theme={null}
  GET https://vantage-au.abbyy.com/api/publicapi/v1/transactions/transaction-id/registrationParameters/
  ```
</CodeGroup>

The response will look like the following:

```json theme={null}
[
  {
    "key": "key1",
    "value": "value1"
  }
]
```

2. By using a `download` method call for the `transactions/<transaction-id>/files/<file-id>/download` resource to get the values in JSON format alongside the file being uploaded:

<CodeGroup>
  ```text US theme={null}
  GET https://vantage-us.abbyy.com/api/publicapi/v1/transactions/transaction-id/files/file-id/download
  ```

  ```text EU theme={null}
  GET https://vantage-eu.abbyy.com/api/publicapi/v1/transactions/transaction-id/files/file-id/download
  ```

  ```text AU theme={null}
  GET https://vantage-au.abbyy.com/api/publicapi/v1/transactions/transaction-id/files/file-id/download
  ```
</CodeGroup>
