Remote Adapter API

NameDescription
AbstractAdapterRegistrationBase data set for remote adapters.
RemoteAdapterRegistrationThe data required to register a remote adapter with Chain.io.
RemoteAdapterSharedSecretThe data required to update a remote adapter with Chain.io.
RemoteAdapterRegistrationUpdateThe data required to update a remote adapter shared secret with Chain.io.
IntegrationIdentifierA unique identifier for a specific flow type. This value controls the specific data that your adapter can expect to receive. Allowed values: co2.register_shipment, co2.receive_co2_update, acctAuto.receive_invoice, acctAuto.send_invoice, acctAuto.send_organization, acctAuto.send_job, acctAuto.receive_payment_receipt, carOps.send_booking, carOps.receive_booking_acknowledgment, carOps.receive_booking_response, carOps.receive_document, vis.register_shipment, vis.receive_shipment_update, rateQuote.send_shipment_rate_request, rateQuote.receive_shipment_rate_response, rateQuote.receive_booking, dataAgg.send_passthrough.
InputAdapterFileFiltersList of regular expressions that, if present, are used to filter input files for open connect adapters of type input. The expressions here will be used to determine if the input file is valid for this adapter. If the file is invalid, the associated flow will be not be executed, and no payload will be sent to the open connect adapter.
XpathExpression
RemoteAdapterThe data associated with your remote adapter.
AbstractConfigurationOptionA single UI component that the user will utilize to enter any configuration values that your adapter will require to function.
StringConfigurationOptionA UI component that accepts string user input.
PasswordConfigurationOptionA UI component that accepts obscurred user input.
RegExConfigurationOptionA UI component that validates the user input by matching it against a provided regular expression. If the input does not match the expression an error message is displayed and the user will not be able to save the configuration.
NumberConfigurationOptionA UI component that ensures the user's input will be a numeric value.
BooleanConfigurationOptionA UI component that will return a true or false value.
ListConfigurationOptionA UI component that will present the user with a list of options to choose from.
TableConfigurationLayoutA UI component that will present the user with a table. Each column is configured to display a distinct configuration option. The value returned in the webhook is an array of objects. The keys for the object are the configured configuration items' identifier and the values are their values.
ErrorResponseA generic API error response.
RemoteAdapterCallbackRequestThe body of the request your adapter will return to Chain.io
RemoteAdapterRequestThe request data that Chain.io will send to a remote adapter.
InputAdapterRequestPayloadThe payload an input adapter remote adapter can expect to receive from the Chain.io platform
InputAdapterRequestPayloadFileA single file from an input payload.
OutputAdapterRequestPayloadThe payload an output adapter can expect to receive. This should be the json data representing the integration type schema that your adapter is implementing. The examples here represent a sample payload a vis.register_shipment output adapter could expect to receive from Chain.io.
InputAdapterResponsePayloadThe payload an input adapter is expected to return in its callback. This should be the json data representing the integration type schema that your adapter is implementing. The examples here represent sample payloads a vis.register_shipment input adapter may return to the callback.
OutputAdapterResponsePayloadThe expected response for an output adapter. This should be the files that your adapter is emitting to the flow's destination system.
RemoteAdapterFileA file that is emitted by the remote adapter.
InputAdapterFileFilters_xpath
XpathExpression_namespaces
RemoteAdapterCallbackRequest_user_logs
RemoteAdapterCallbackRequest_data_tags
NameData TypeDescriptionRequired
integration_identifiersArray<IntegrationIdentifier>A list of the Flow Setup types where your adapter should be available
display_nameStringThe name that will be displayed to the user when selecting the adapter to use in a flow.
display_descriptionStringA short description of your adapter that users will see when they are selecting it.
support_urlStringA link that users can follow to learn more about your adapter
adapter_typeStringIdentifies whether this adapter will considered an input (source) adapter or an output (destination) adapter. Allowed values: input, output.
webhook_urlStringThe URL that Chain.io should send requests to in order to invoke your adapter. This URL should handle the Chain.io webhook format documented in this API guide.
adapter_icon_urlStringA url that Chain.io will use to display an icon with your adapter to users.
publication_typeStringIf 'public', your adapter will be available to all Chain.io users. If 'private', you must send at least one workspace_associations value to allow users of that workspace to select your adapter. Allowed values: public, private.
workspace_associationsArray<String>A list of the IDs for every workspace that will have access to use your adapter. This list is only utilized if the publication_type is set to 'private'.
configuration_optionsArray<StringConfigurationOption | RegExConfigurationOption | PasswordConfigurationOption | NumberConfigurationOption | BooleanConfigurationOption | ListConfigurationOption | TableConfigurationLayout>List of configuration options to present to users when they configure your adapter. The values the user entered for these configuration options will included in the payload send to your webhook_url when your adapter is invoked.
NameData TypeDescriptionRequired
integration_identifiersArray<IntegrationIdentifier>A list of the Flow Setup types where your adapter should be availableYES
display_nameStringThe name that will be displayed to the user when selecting the adapter to use in a flow.YES
display_descriptionStringA short description of your adapter that users will see when they are selecting it.YES
support_urlStringA link that users can follow to learn more about your adapter
adapter_typeStringIdentifies whether this adapter will considered an input (source) adapter or an output (destination) adapter. Allowed values: input, output.YES
webhook_urlStringThe URL that Chain.io should send requests to in order to invoke your adapter. This URL should handle the Chain.io webhook format documented in this API guide.YES
adapter_icon_urlStringA url that Chain.io will use to display an icon with your adapter to users.
publication_typeStringIf 'public', your adapter will be available to all Chain.io users. If 'private', you must send at least one workspace_associations value to allow users of that workspace to select your adapter. Allowed values: public, private.YES
workspace_associationsArray<String>A list of the IDs for every workspace that will have access to use your adapter. This list is only utilized if the publication_type is set to 'private'.
configuration_optionsArray<StringConfigurationOption | RegExConfigurationOption | PasswordConfigurationOption | NumberConfigurationOption | BooleanConfigurationOption | ListConfigurationOption | TableConfigurationLayout>List of configuration options to present to users when they configure your adapter. The values the user entered for these configuration options will included in the payload send to your webhook_url when your adapter is invoked.
shared_secretStringThe shared secret that Chain.io should utilize when signing requests sent to your webhook url. You will need to utilize this secret to verify the webhook requests were sent by Chain.io. You must also utilize this same secret when signing responses returned to Chain.io.YES
input_adapter_file_filtersInputAdapterFileFilters
notification_emailsArray<String>A list of email addresses whose owners will be notified when the registration request is approved or denied.
NameData TypeDescriptionRequired
shared_secretStringThe shared secret that Chain.io should utilize when signing requests sent to your webhook url. You will need to utilize this secret to verify the webhook requests were sent by Chain.io. You must also utilize this same secret when signing responses returned to Chain.io.YES
NameData TypeDescriptionRequired
integration_identifiersArray<IntegrationIdentifier>A list of the Flow Setup types where your adapter should be availableYES
display_nameStringThe name that will be displayed to the user when selecting the adapter to use in a flow.YES
display_descriptionStringA short description of your adapter that users will see when they are selecting it.YES
support_urlStringA link that users can follow to learn more about your adapter
adapter_typeStringIdentifies whether this adapter will considered an input (source) adapter or an output (destination) adapter. Allowed values: input, output.YES
webhook_urlStringThe URL that Chain.io should send requests to in order to invoke your adapter. This URL should handle the Chain.io webhook format documented in this API guide.YES
adapter_icon_urlStringA url that Chain.io will use to display an icon with your adapter to users.
publication_typeStringIf 'public', your adapter will be available to all Chain.io users. If 'private', you must send at least one workspace_associations value to allow users of that workspace to select your adapter. Allowed values: public, private.YES
workspace_associationsArray<String>A list of the IDs for every workspace that will have access to use your adapter. This list is only utilized if the publication_type is set to 'private'.
configuration_optionsArray<StringConfigurationOption | RegExConfigurationOption | PasswordConfigurationOption | NumberConfigurationOption | BooleanConfigurationOption | ListConfigurationOption | TableConfigurationLayout>List of configuration options to present to users when they configure your adapter. The values the user entered for these configuration options will included in the payload send to your webhook_url when your adapter is invoked.
input_adapter_file_filtersInputAdapterFileFilters
notification_emailsArray<String>A list of email addresses whose owners will be notified when the registration request is approved or denied.
NameData TypeDescriptionRequired
NameData TypeDescriptionRequired
warning_message_for_userStringA message to the warn the user that this adapter will cause inputs to the flow to be filtered. Please include information describing what criteria are used in the filter.YES
xpathInputAdapterFileFilters_xpath
NameData TypeDescriptionRequired
namespacesArray<XpathExpression_namespaces>
xpathString
NameData TypeDescriptionRequired
NameData TypeDescriptionRequired
nameStringThe name of the configuration option that will be passed to your webhook. This property is functionally equivalent to the name attribute used in HTML form components. Do not use the same name for multiple options in your adapter.
labelStringThe name of the option that will be displayed to the user.
descriptionStringA short description that will be shown to the user as help text when they are configuring the option.
support_urlStringA link that users can follow to learn more about this adapter configuration item.
config_typeStringThe data type of the configuration option. See the Configuration Data Types guide article for more details. Allowed values: string, password, regex, number, boolean, list, table.
requiredBooleanShould the user be required to complete this option? Does not apply to boolean and table config types.
NameData TypeDescriptionRequired
NameData TypeDescriptionRequired
NameData TypeDescriptionRequired
NameData TypeDescriptionRequired
NameData TypeDescriptionRequired
NameData TypeDescriptionRequired
NameData TypeDescriptionRequired
NameData TypeDescriptionRequired
status_codeIntegerStandard http status code returned with this error.
error_typeStringAllowed values: invalid_token, invalid_token, invalid_signature, invalid_request, unknown_error.
messagesArray<String>
NameData TypeDescriptionRequired
statusStringSee the Core Concepts page in the guide to learn more about the statuses you can return. Allowed values: success, skipped, error, bug.
user_logsArray<RemoteAdapterCallbackRequest_user_logs>List of user log messages to display to user in the Chain.io portal's flow execution results page.
callbackStringReturn the exact callback string that Chain.io sent to your webhook_url.
filesArray<RemoteAdapterFile>A list of additional files to provide to the user in the Flow Execution screen. These files are not passed to other adapters. You may return up to 5 files per adapter execution. Each file may be up to 100 MB in size. If you require larger files, we recommend hosting the files with your own solution and providing a link to the files in a user_log message.
data_tagsArray<RemoteAdapterCallbackRequest_data_tags>List of data tags to display to the user. These tags are utilized by the user to search for specific executions of the flow that involved your adapter.
payloadInputAdapterResponsePayload | OutputAdapterResponsePayload
NameData TypeDescriptionRequired
callbackStringA string unique to every single request payload sent to the remote adapter. This callback value must be returned verbatim in every single response sent back to Chain.io's callback endpoint.YES
configurationObjectAll the configuration values the user set up in the Chain.io Portal for this flow.YES
payloadInputAdapterRequestPayload | OutputAdapterRequestPayloadThe actual flow data the remote adapter should process. For input adapters this will be an array of the files that were received by the flow. For output adapters this will be a json object formatted in the shape of the specific solution schema the adapter is registered to participate in.YES
NameData TypeDescriptionRequired
NameData TypeDescriptionRequired
file_nameStringThe file name. Whenever possible this name will represent the exact file name of the file as received by Chain.io. Some transfer formats, like http, do not lend themselves to providing filenames. In those cases Chain.io will generate the file name and use some file heuristics to provide a best guess on the extension to utilize.YES
mime_typeStringThe media type Chain.io has determined best fits the file. Transfer formats like http that provide media types will typically provide the most accurate mime types. For transfer formats like sftp Chain.io will use a best guest approach to determining the mime_type based on the file name.YES
bodyStringThe raw file contents received by Chain.io. See the content_transfer_encoding to determine the charset to use to decode the file contents.YES
content_transfer_encodingStringThe encoding used to transfer the file body. Allowed values: utf8, base64.YES
NameData TypeDescriptionRequired
NameData TypeDescriptionRequired
NameData TypeDescriptionRequired
NameData TypeDescriptionRequired
file_nameStringThe name of the file that will be displayed to the user. We strongly encourage utilizing standard file name extensions (.json, .xml, etc) to allow users to utilize our inline web file viewer to access these files.YES
file_typeStringA simple file descriptor that will be displayed to the user to help them understand what the contents of the file represent.
mime_typeStringThe IANA media type of the file your adapter is emitting. This is the content-type of your file.YES
bodyStringThe contents of the file. For character based files like json or xml, this should be the actual string representation of the data. JSON data should be stringified.YES
content_transfer_encodingStringThe encoding used to transfer the file body. File bodies that cannot be represented as a UTF-8 string in a json payload must first be encoded in an accepted encoding before being transferred. Typically, this is required for most mime_types that are NOT text/plain, application/json or application/xml. This field can be excluded when no transfer encoding is applied, in which case, utf8 encoding will be assumed. Allowed values: base64, utf8.YES
NameData TypeDescriptionRequired
matches_all_expressionsArray<XpathExpression>
matches_any_expressionArray<XpathExpression>
NameData TypeDescriptionRequired
prefixString
namespaceString
NameData TypeDescriptionRequired
levelStringLog level which will be displayed to users. Allowed values: info, warning, error.YES
messageStringThe actual log message to display to the users.YES
timestampDateTimeThe timestamp of when message was generated in ISO-8601 format. If no timezone is present, then the system will assume a timezone of UTC.YES
NameData TypeDescriptionRequired
labelStringThe type of data represented by the tag value. The label is not searchable by the user.YES
valueStringThe searchable value for this tag.YES