Steps
Use the following steps to retrieve JSON Schema for a given quote and respond with the required information.Step 1: Get the JSON Schema
Call the get details for an RFI endpoint. The API returns a JSON Schema object that defines the fields that must be transmitted in the RFI response.Step 2: Build a JSON response
Using the schema as a blueprint, construct your RFI data as a JSON object. For example, if the schema requires theaddress field, you should create a nested
JSON object for the address, as defined by the schema’s properties and
$defs.
Step 3: Validate the response
Before encrypting the response for transit, CPN expects that you perform client-side validation on the data. Using a JSON Schema validation library, check your constructed JSON objects against the schemas from Step 1. This should catch any structural or formatting errors before you interact with the CPN API.Step 4: Encrypt the response
Once validated, convert your JSON objects to strings and encrypt them. The steps outlined in How-to: Encrypt Travel Rule and Beneficiary Account Data also apply to encrypting RFI data for transit.Step 5: Transmit the payload
Send the encrypted payload to the submit RFI data endpoint. The following is an example payload:JSON