On Demand Configuration (ODC)

Description

On Demand Configuration (ODC) is a feature that enables merchants to customize verifications through an API. ODC supports the substitution of eSignature documents and Video Agreement scripts.

How it Works

To utilize ODC, merchants must create a JSON file containing the required information and send it to the endpoint POST /v2/on-demand-configuration. The response will include a configurationId, which can then be used as a parameter when creating verifications to apply the configuration settings.

Each merchant's configurations are unique and can be used an unlimited number of times. In the event of a configuration issue, existing verifications will not be affected, but the configuration will not be applied to new ones.

Endpoints

POST safety/v1/upload/electronic-signature/file
Endpoint for uploading a PDF document to be used in ODC.

Sample Request

curl --location --request POST '<https://api.getmati.com/safety/v1/upload/electronic-signature/file>'  
--header 'Authorization: Bearer {{ACCESS_TOKEN}}'  
--form 'file=@"/C:/Users/enriq/Downloads/Summary (1).pdf"'

Response

[  
    {  
        "id": "b2d4518e-7cc2-4367-b854-5a43caf27657",  
        "mediaId": "6390a645aabee1001bc4e8ee"  
    }  
]

POST v2/on-demand-configuration
Endpoint for submitting ODC configuration.

Sample Request

curl --location --request POST '<https://api.getmati.com/v2/on-demand-configuration>'  
--header 'Authorization: Bearer {{ACCESS_TOKEN}}'  
--header 'Content-Type: application/json'  
--data-raw '{  
    "electronicSignature": {  
        "templates": [  
            {  
                "id": "b2d4518e-7cc2-4367-b854-5a43caf27657",  
                "mediaId": "6390a645aabee1001bc4e8ee"  
            }  
        ]  
    },  
    "videoAgreement": {  
        "script": "New videoAgreement script",  
        "language": "en-US"  
    }  
}'

Sample Response

{
    "configurationId": "639868f493f873001be088a0"
}

Using the configuration token in the SDK

Once the configuration token has been obtained, it can be specified when instantiating a verification using the SDK. This will override the original configuration of the verification.

Here's an example of how to specify the configuration token in the SDK:

<script src="https://web-button.getmati.com/button.js">
  </script>
  <mati-button
    clientid="5bf6f98fd0e8ae2541d3f8bb"
    flowId="6356adef43dde2001d6b30c9"
		configurationId= "639868f493f873001be088a0"
    metadata='{"email":"[email protected]"}'
  />