- Create Data Connector Request
You can create a data connector by providing the required parameters.
A description of what this data connector does.
The HTTP method used when calling the external API.
The URL of the external API endpoint. Supports template variables like {{order_id}}.
Whether the connector is used directly by Fin (true) or only in workflows (false). Defaults to false.
The user types this connector is available for.
[ "leads", "visitors" ]
Whether the connector requires customer authentication before executing. Defaults to false.
Whether authentication is bypassed entirely (public endpoint). Defaults to false.
Whether to validate that all required data inputs have values before executing.
A sample JSON response from the external API. Auto-generates response_fields and sets configuration_response_type to mock_response_type.
{ "order": { "id": 12345, "status": "shipped" } }
IDs of authentication tokens to attach to this data connector.
[ "1234", "5678" ]
The type of data transformation to apply to the response. Setting this to code_block_transformation requires transform_code_block to also be set.
The code block to use when data_transformation_type is code_block_transformation. New connectors are created in draft state, so the code block test described on Update a data connector does not run until the connector is published. null is the same as omitting this field.
{ "code": "def transform(response):\n return {\"status\": response[\"order_status\"]}\n\nreturn transform(inputs['data'])\n", "language": "python" }
{ "name": "Get Order Status", "description": "Looks up order status from an external service", "http_method": "get", "url": "https://api.example.com/orders/{{order_id}}/status", "body": "string", "direct_fin_usage": false, "audiences": [ "leads", "visitors" ], "headers": [ { … } ], "data_inputs": [ { … } ], "customer_authentication": false, "bypass_authentication": false, "validate_missing_attributes": false, "mock_response": { "order": { … } }, "token_ids": [ "1234", "5678" ], "data_transformation_type": "code_block_transformation", "transform_code_block": { "code": "def transform(response):\n return {\"status\": response[\"order_status\"]}\n\nreturn transform(inputs['data'])\n", "language": "python" } }