> For the complete documentation index, see [llms.txt](https://doc.wearepatchworks.com/product-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.wearepatchworks.com/product-documentation/api-reference/flow-actions/flow-versions.md).

# Flow Versions

## List Flow Versions

> Retrieves a paginated list of all versions for a specific flow.

```json
{"openapi":"3.0.0","info":{"title":"Patchworks Core API","version":"1.0.0"},"tags":[{"name":"Flow Versions"}],"servers":[{"url":"https://core.wearepatchworks.com"}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"API key passed in the Authorization header. Format: `<api-key>`"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2 Bearer token obtained from POST /fabric/api/login"}},"schemas":{"FlowsListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Flows"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"},"links":{"$ref":"#/components/schemas/PaginationLinks"}}},"Flows":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"name":{"type":"string"},"enabled_at":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["Draft","Inactive","Deployed"]},"format":{"type":"string","enum":["csv","json","txt","xml"]},"body":{"type":"string"},"deployed_at":{"type":"string"},"labels":{"type":"array","items":{"$ref":"#/components/schemas/Labels"}},"notification_groups":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"description":{"type":"string"},"layout_direction":{"type":"string"},"is_enabled":{"type":"boolean"},"latest_version":{"$ref":"#/components/schemas/FlowVersions"},"current_version":{"$ref":"#/components/schemas/FlowVersions"},"deployed_version":{"$ref":"#/components/schemas/FlowVersions"},"latest_deployed_version":{"$ref":"#/components/schemas/FlowVersions"},"versions":{"type":"array","items":{"$ref":"#/components/schemas/FlowVersions"}},"version_type_counts":{"type":"array","items":{"type":"object"}},"message_brokers":{"type":"array","items":{"$ref":"#/components/schemas/MessageBrokers"}},"message_broker_queues":{"type":"array","items":{"$ref":"#/components/schemas/MessageBrokerQueues"}},"notification_group_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlowNotificationGroup"}},"webhooks":{"type":"array","items":{"type":"object"}},"callbacks":{"type":"array","items":{"type":"object"}},"current_version_step_count":{"type":"integer"},"current_version_connector_count":{"type":"integer"},"current_version_script_count":{"type":"integer"},"current_version_cache_count":{"type":"integer"},"current_version_data_pool_count":{"type":"integer"},"current_version_cross_ref_count":{"type":"integer"},"use_queued_time":{"type":"boolean"},"remove_failed_payloads":{"type":"boolean"},"priority":{"type":"array","items":{"type":"object"}},"prod_flag":{"type":"boolean"},"deployments":{"type":"array","items":{"$ref":"#/components/schemas/FlowVersionDeployment"}},"webhooks_count":{"type":"integer"},"callbacks_count":{"type":"integer"},"marketplace_app_id":{"type":"integer"},"blueprint_id":{"type":"integer"},"blueprint_version_number":{"type":"string"},"flow_folder_id":{"type":"integer"},"flow_message_broker_queues":{"type":"array","items":{"$ref":"#/components/schemas/FlowMessageBrokerQueue"}},"max_concurrency":{"type":"integer"}}},"Labels":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier"},"colour":{"type":"string","enum":["blue","blue_inverted","cyan","cyan_inverted","gray","gray_inverted","green","green_inverted","orange","orange_inverted","pink","pink_inverted","purple","purple_inverted","red","red_inverted","yellow","yellow_inverted"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"}}},"FlowVersions":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"virtual_environment_id":{"type":"string"},"flow_version_id":{"type":"string"},"priority":{"type":"integer"},"cron_string":{"type":"string"},"microservice":{"type":"string"},"config":{"type":"string"},"flow_step_route_id":{"type":"integer"},"variables":{"type":"array","items":{"$ref":"#/components/schemas/FlowVersionVariable"}},"parent_id":{"type":"integer"},"type":{"type":"string"},"key":{"type":"string"},"value":{"type":"string"},"date_format":{"type":"string"},"secret":{"type":"string"},"enabled_at":{"type":"string"},"created_at":{"type":"string","format":"date-time","items":{"type":"object"}},"updated_at":{"type":"string","format":"date-time","items":{"type":"object"}},"flow_id":{"type":"integer"},"flow_name":{"type":"string"},"flow_priority":{"type":"string"},"iteration":{"type":"integer"},"status":{"type":"string","enum":["Draft","Inactive","Deployed"]},"is_deployed":{"type":"boolean"},"is_editable":{"type":"boolean"},"deployed_at":{"type":"string","format":"date-time"},"deployed_by":{"type":"object"},"deployed_by_user":{"type":"object"},"deployments":{"type":"array","items":{"$ref":"#/components/schemas/FlowVersionDeployment"}},"has_callback_step":{"type":"boolean"},"steps":{"type":"array","items":{"$ref":"#/components/schemas/FlowSteps"}},"runs":{"type":"array","items":{"type":"object"}},"latest_run":{"type":"string"},"schedules":{"type":"array","items":{"type":"object"}},"filters":{"type":"array","items":{"type":"object"}},"steps_count":{"type":"array","items":{"type":"object"}},"pivot":{"type":"string"},"saved_at":{"type":"string","format":"date-time"},"saved_by":{"type":"string"},"saved_by_user":{"type":"object"}}},"FlowVersionVariable":{"type":"object","properties":{"id":{"type":"integer"},"type":{"type":"string","enum":["string","number","absolute date","relative date","boolean"]},"value":{"type":"string"},"key":{"type":"string"},"date_format":{"type":"string"},"secret":{"type":"boolean"}}},"FlowVersionDeployment":{"type":"object","properties":{"id":{"type":"integer"},"flow_version_id":{"type":"integer"},"flow_version":{"$ref":"#/components/schemas/FlowVersions"},"virtual_environment_id":{"type":"integer"},"virtual_environment":{"$ref":"#/components/schemas/VirtualEnvironments"},"enabled_by":{"type":"string"},"enabled_by_user":{"type":"object"},"enabled_at":{"type":"string","format":"date-time"},"package_id":{"type":"integer"},"package":{"$ref":"#/components/schemas/Packages"},"user_id":{"type":"integer"},"user":{"type":"object"},"priority":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"VirtualEnvironments":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"notes":{"type":"string"},"deployed_at":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string"},"name":{"type":"string","items":{"type":"object"}},"description":{"type":"string","items":{"type":"object"}},"type":{"type":"string","items":{"type":"object"},"enum":["LIVE","TEST"]},"deployments":{"type":"array","items":{"$ref":"#/components/schemas/FlowVersionDeployment"}},"versions":{"type":"array","items":{"$ref":"#/components/schemas/VirtualEnvironmentVersions"}},"versions_count":{"type":"integer"},"first_version":{"$ref":"#/components/schemas/VirtualEnvironmentVersions"},"deployed_version":{"$ref":"#/components/schemas/VirtualEnvironmentVersions"},"flows":{"type":"string"},"is_deployed":{"type":"boolean"},"deployments_count":{"type":"array","items":{"type":"object"}},"pivot":{"type":"array","items":{"type":"object"}},"package_deployments":{"type":"array","items":{"$ref":"#/components/schemas/PackageVirtualEnvironment"}},"labels":{"type":"array","items":{"$ref":"#/components/schemas/Labels"}}}},"VirtualEnvironmentVersions":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"flow_id":{"type":"string"},"priority":{"type":"integer"},"model_type":{"type":"string"},"original_model_id":{"type":"string"},"replacement_model_id":{"type":"string"},"type":{"type":"string"},"key":{"type":"string"},"value":{"type":"string"},"fallback":{"type":"string"},"date_format":{"type":"string"},"secret":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"version":{"type":"object"},"virtual_environment_id":{"type":"integer"},"virtual_environment":{"$ref":"#/components/schemas/VirtualEnvironments"},"status":{"type":"string","enum":["Draft","Inactive","Deployed"]},"deployed_at":{"type":"string","format":"date-time"},"deployed_by":{"type":"array","items":{"type":"object"}},"notes":{"type":"array","items":{"type":"object"}},"manifests":{"type":"array","items":{"$ref":"#/components/schemas/VirtualEnvironmentVersionManifest"}},"variables":{"type":"array","items":{"$ref":"#/components/schemas/VirtualEnvironmentVersionVariable"}},"counts":{"type":"string"},"user_id":{"type":"object"},"user":{"type":"object"}}},"VirtualEnvironmentVersionManifest":{"type":"object","properties":{"id":{"type":"integer"},"virtual_environment_version_id":{"type":"integer"},"virtual_environment_version":{"$ref":"#/components/schemas/VirtualEnvironmentVersions"},"model_type":{"type":"string"},"original_model_id":{"type":"integer"},"original_model":{},"replacement_model_id":{"type":"integer"},"replacement_model":{},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"VirtualEnvironmentVersionVariable":{"type":"object","properties":{"id":{"type":"integer"},"virtual_environment_version_id":{"type":"integer"},"type":{"type":"string"},"value":{"type":"string"},"fallback":{"type":"string"},"key":{"type":"string"},"date_format":{"type":"string"},"secret":{"type":"boolean"}}},"PackageVirtualEnvironment":{"type":"object","properties":{"user":{"type":"object"},"package":{"$ref":"#/components/schemas/Packages"}}},"Packages":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"name":{"type":"string"},"notes":{"type":"string"},"created_by":{"type":"string","items":{"type":"object"}},"priority":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"created_by_user":{"type":"object"},"flow_versions":{"type":"array","items":{"$ref":"#/components/schemas/FlowVersions"}},"virtual_environments":{"type":"array","items":{"$ref":"#/components/schemas/VirtualEnvironments"}},"deployments":{"type":"array","items":{"$ref":"#/components/schemas/PackageVirtualEnvironment"}},"flow_versions_count":{"type":"integer"},"deployments_count":{"type":"integer"},"flow_version_deployments_count":{"type":"integer"}}},"FlowSteps":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"first_step_id":{"type":"string"},"filter_logic_operator":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"flow_version_id":{"type":"integer"},"name":{"type":"string"},"microservice":{"type":"object","enum":["gateway","trigger","start","connector","pull","push","map","filter","route","script","manual-payload","assert-payload","split","batch","dedupe","cache","cache-set","cache-get","track","variable-set","run-flow","logging","events","notify","try-catch","branch","callback","data-transform","medium-processor","long-processor","scheduler","cross-reference"]},"config":{"type":"object"},"parent_id":{"type":"object"},"flow_version":{"$ref":"#/components/schemas/FlowVersions"},"children":{"type":"object"},"endpoint":{"$ref":"#/components/schemas/Endpoints"},"connector":{"$ref":"#/components/schemas/Connectors"},"data_pool":{"$ref":"#/components/schemas/DataPool"},"filters":{"type":"array","items":{"$ref":"#/components/schemas/Filters"}},"parent_flow_step":{"$ref":"#/components/schemas/FlowSteps"},"routes":{"type":"array","items":{"$ref":"#/components/schemas/FlowStepRoute"}},"variables":{"type":"array","items":{"$ref":"#/components/schemas/Variables"}},"script_version":{"$ref":"#/components/schemas/ScriptVersions"},"cache":{"$ref":"#/components/schemas/Caches"},"payloads":{"type":"array","items":{"$ref":"#/components/schemas/PayloadMetadata"}},"flow":{"$ref":"#/components/schemas/Flows"},"cross_references":{"type":"string"},"notes_count":{"type":"object"},"notification_group":{"type":"object"},"order":{"type":"string"}}},"Endpoints":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"field_path":{"type":"string"},"tags":{"type":"string"},"label":{"type":"string"},"key":{"type":"string"},"value":{"type":"string"},"secret":{"type":"string"},"variables":{"type":"array","items":{"$ref":"#/components/schemas/Variables"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"object"},"system_id":{"type":"integer"},"system":{"$ref":"#/components/schemas/Systems"},"entity_type_id":{"type":"integer"},"entity_type":{"$ref":"#/components/schemas/EntityType"},"endpoint":{"type":"string"},"http_method":{"type":"string","enum":["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"]},"data_type":{"type":"string","enum":["csv","json","txt","xml"]},"pagination_method":{"type":"string","enum":["Custom relative URI","Link Header","Next page token","Next Page URL","Page number parameter","Limit offset","default","PeopleVox","NetSuite SOAP","GraphQL Cursor","Database limit offset","Script"]},"deprecated_at":{"type":"string","format":"date-time"},"direction":{"type":"string","enum":["Send","Receive"]},"returns_multiple_records":{"type":"boolean"},"pre_script_version_id":{"type":"string"},"post_script_version_id":{"type":"string"},"endpoint_schema":{"$ref":"#/components/schemas/EndpointSchema"},"field_tags":{"type":"array","items":{"type":"object"}},"data_path":{"type":"array","items":{"type":"object"}},"body_format":{"type":"array","items":{"type":"object"},"enum":["none","form-data","raw","text"]},"raw_body":{"type":"array","items":{"type":"object"}},"filters":{"type":"array","items":{"$ref":"#/components/schemas/Filters"}},"modified":{"type":"array","items":{"type":"object"}},"help_link":{"type":"array","items":{"type":"object"}},"authentication_implementations":{"type":"array","items":{"$ref":"#/components/schemas/AuthenticationImplementations"}},"pre_script_version":{"$ref":"#/components/schemas/ScriptVersions"},"post_script_version":{"$ref":"#/components/schemas/ScriptVersions"},"disable_header_addition":{"type":"boolean"},"response_encoding":{"type":"string","enum":["base64","none"]}}},"Variables":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier"},"label":{"type":"string"},"key":{"type":"string"},"value":{"type":"string"},"secret":{"type":"boolean"},"locked":{"type":"boolean"},"configurable":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"modified":{"type":"string"},"pivot":{"type":"object"},"required":{"type":"boolean"},"advanced":{"type":"boolean"},"alias":{"type":"string"}}},"Systems":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"name":{"type":"string"},"entity_type_id":{"type":"integer"},"direction":{"type":"string","enum":["Send","Receive"]},"http_method":{"type":"string","enum":["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"]},"label":{"type":"string"},"colour":{"type":"string","enum":["blue","blue_inverted","cyan","cyan_inverted","gray","gray_inverted","green","green_inverted","orange","orange_inverted","pink","pink_inverted","purple","purple_inverted","red","red_inverted","yellow","yellow_inverted"]},"system_template_id":{"type":"integer"},"version":{"type":"integer"},"version_name":{"type":"string"},"system_type_id":{"type":"integer"},"protocol":{"type":"string","enum":["HTTP","FTP","SFTP","FTPS","S3","MySQL","PGSQL","SQLSRV","PUBLIC","OCI"]},"date_format":{"type":"string"},"help_link":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"rate_limit_unit":{"type":"string","enum":["second","minute","hour","day"]},"rate_limit_duration":{"type":"integer"},"endpoint":{"type":"string"},"method":{"type":"string"},"data_type":{"type":"string","enum":["csv","json","txt","xml"]},"body_format":{"type":"string","enum":["none","form-data","raw","text"]},"additional_endpoint_1":{"type":"string"},"additional_endpoint_2":{"type":"string"},"timeout":{"type":"integer"},"authentication_type_id":{"type":"string"},"returns_multiple_records":{"type":"string"},"pagination_method":{"type":"string","enum":["Custom relative URI","Link Header","Next page token","Next Page URL","Page number parameter","Limit offset","default","PeopleVox","NetSuite SOAP","GraphQL Cursor","Database limit offset","Script"]},"schema":{"type":"string"},"endpoint_template_id":{"type":"integer"},"data_path":{"type":"string"},"raw_body":{"type":"string"},"deprecated_at":{"type":"string"},"disable_header_addition":{"type":"string"},"response_encoding":{"type":"string","enum":["base64","none"]},"key":{"type":"string"},"value":{"type":"string"},"secret":{"type":"string"},"logo":{"$ref":"#/components/schemas/MediaFiles"},"pre_script_version_id":{"type":"string"},"post_script_version_id":{"type":"string"},"canonical_key":{"type":"array","items":{"type":"object"}},"connectors":{"type":"array","items":{"$ref":"#/components/schemas/Connectors"}},"system_type":{"$ref":"#/components/schemas/SystemType","enum":["Accounting","CRM","eCommerce","ERP","Marketplaces","Other","PIM","POS","3PL","WMS","Database"]},"system_template":{"$ref":"#/components/schemas/SystemTemplates"},"authentication_implementations":{"type":"array","items":{"$ref":"#/components/schemas/AuthenticationImplementations"}},"authentication_implementations_count":{"type":"array","items":{"type":"object"}},"endpoints":{"type":"array","items":{"$ref":"#/components/schemas/Endpoints"}},"variables":{"type":"array","items":{"$ref":"#/components/schemas/Variables"}},"updatable":{"type":"string"},"modified":{"type":"string"},"is_deployed":{"type":"boolean"}}},"MediaFiles":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"model_type":{"type":"string"},"model_id":{"type":"integer"},"file_name":{"type":"string"},"mime_type":{"type":"string"},"expires_at":{"type":"string","format":"date-time"},"is_expired":{"type":"boolean"}}},"Connectors":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"authentication_implementation_id":{"type":"integer"},"timezone":{"type":"string"},"date_format":{"type":"string"},"rate_limit_unit":{"type":"string","enum":["second","minute","hour","day"]},"rate_limit_duration":{"type":"integer"},"connection_pool_id":{"type":"integer"},"variables":{"type":"array","items":{"$ref":"#/components/schemas/Variables"}},"session_id":{"type":"string"},"platform_app_key":{"type":"string"},"certificate_id":{"type":"string"},"type":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"authentication_implementation":{"$ref":"#/components/schemas/AuthenticationImplementations"},"system":{"$ref":"#/components/schemas/Systems"},"certificate":{"$ref":"#/components/schemas/Certificates"}}},"AuthenticationImplementations":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"endpoint_ids":{"type":"string"},"label":{"type":"string"},"key":{"type":"string"},"value":{"type":"string"},"secret":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"endpoint":{"type":"string"},"method":{"type":"string"},"additional_endpoint_1":{"type":"string"},"additional_endpoint_2":{"type":"string"},"authentication_type_id":{"type":"integer"},"authentication_implementation_template_id":{"type":"integer"},"authentication_type":{"$ref":"#/components/schemas/AuthenticationType"},"system_id":{"type":"integer"},"body_format":{"type":"string","enum":["none","form-data","raw","text"]},"data_type":{"type":"string","enum":["csv","json","txt","xml"]},"pre_script_version_id":{"type":"string"},"post_script_version_id":{"type":"string"},"timeout":{"type":"integer"},"system":{"$ref":"#/components/schemas/Systems"},"variables":{"type":"array","items":{"$ref":"#/components/schemas/Variables"}},"endpoints":{"type":"array","items":{"$ref":"#/components/schemas/Endpoints"}},"pre_script_version":{"$ref":"#/components/schemas/ScriptVersions"},"post_script_version":{"$ref":"#/components/schemas/ScriptVersions"},"modified":{"type":"string"},"help_link":{"type":"string"},"disable_token_url_parameters":{"type":"boolean"}}},"AuthenticationType":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"label":{"type":"string"},"is_enabled":{"type":"boolean"},"hidden":{"type":"boolean"},"protocol":{"type":"string","enum":["HTTP","FTP","SFTP","FTPS","S3","MySQL","PGSQL","SQLSRV","PUBLIC","OCI"]}}},"ScriptVersions":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"script_id":{"type":"string"},"name":{"type":"string"},"version":{"type":"integer"},"status":{"type":"string","enum":["Draft","Inactive","Deployed"]},"deployment_failure_reason":{"type":"string"},"last_invoked_on":{"type":"string"},"deployed_at":{"type":"string","format":"date-time"},"deployment_failed_at":{"type":"string","format":"date-time"},"deploying":{"type":"boolean"},"content":{"type":"object"},"script":{"$ref":"#/components/schemas/Scripts"},"deployment_failure_detail":{"type":"string"},"is_draft":{"type":"boolean"}}},"Scripts":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier"},"script_template_id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string","items":{"type":"object"}},"language":{"type":"string","items":{"type":"object"},"enum":["c_sharp_8_0","go_1_18","go_1_23","go_1_26","rust_1_82","rust_1_94","node_18","node_20","node_22","node_24","php_8_1","php_8_2","php_8_3","php_8_4","php_8_5","python_3","mcp","ruby_3"]},"created_at":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"script_id":{"type":"integer"},"version":{"type":"string"},"deployed_at":{"type":"string"},"deployment_failed_at":{"type":"string"},"deploying":{"type":"string"},"deployment_failure_reason":{"type":"string"},"content":{"type":"string"},"ai_created":{"type":"boolean"},"value":{"type":"string"},"versions":{"type":"array","items":{"$ref":"#/components/schemas/ScriptVersions"}},"latest_version":{"$ref":"#/components/schemas/ScriptVersions"},"type":{"type":"string","enum":["custom","pre_auth","post_auth","pre_request","post_request","pagination"]},"updated_by":{"type":"string"},"updated_by_user":{"type":"string"},"versions_count":{"type":"integer"},"versions_remaining":{"type":"string"},"max_versions":{"type":"string"},"unlimited_versions":{"type":"boolean"}}},"Certificates":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"connector_id":{"type":"integer"},"certificate":{"type":"string"},"passphrase":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"object"},"user_id":{"type":"object"},"connector":{"$ref":"#/components/schemas/Connectors"},"user":{"type":"object"},"message_broker_id":{"type":"integer"}}},"SystemType":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"label":{"type":"string"},"system_templates":{"type":"array","items":{"$ref":"#/components/schemas/SystemTemplates"}}}},"SystemTemplates":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"label":{"type":"string"},"colour":{"type":"string","enum":["blue","blue_inverted","cyan","cyan_inverted","gray","gray_inverted","green","green_inverted","orange","orange_inverted","pink","pink_inverted","purple","purple_inverted","red","red_inverted","yellow","yellow_inverted"]},"logo_url":{"type":"string"},"version":{"type":"integer"},"version_name":{"type":"string"},"rate_limit_unit":{"type":"string","enum":["second","minute","hour","day"]},"protocol":{"type":"object","enum":["HTTP","FTP","SFTP","FTPS","S3","MySQL","PGSQL","SQLSRV","PUBLIC","OCI"]},"rate_limit_duration":{"type":"integer"},"system_type_id":{"type":"integer"},"system_type":{"$ref":"#/components/schemas/SystemType","enum":["Accounting","CRM","eCommerce","ERP","Marketplaces","Other","PIM","POS","3PL","WMS","Database"]},"date_format":{"type":"string"},"canonical_key":{"type":"object"},"company_id":{"type":"object"},"public_company_id":{"type":"object"},"company":{"type":"object"},"public_company":{"type":"object"},"logo":{"$ref":"#/components/schemas/MediaFiles"},"instances":{"type":"array","items":{"type":"object"}},"authentication_implementation_templates":{"type":"array","items":{"type":"object"}},"marketplace_company_id":{"type":"object"},"marketplace_company":{"type":"object"},"help_link":{"type":"string"}}},"EntityType":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"label":{"type":"string"}}},"EndpointSchema":{"type":"object","properties":{"id":{"type":"integer"},"endpoint_id":{"type":"integer"},"endpoint":{"$ref":"#/components/schemas/Endpoints"},"schema":{"type":"string"}}},"Filters":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"type":{"type":"string","enum":["string","string_length","number","absolute date","relative date","XPath","boolean","null","variable","array","array_length"]},"comparison":{"type":"string","enum":[">","<","==","<=",">=","!=","*","!*","NOT NULL","IS NULL","*[]","!*[]","regex"]},"value":{"type":"string"},"value_type":{"type":"string","enum":["string","integer","float","boolean","date"]},"keep_matching":{"type":"boolean"},"operator_logic":{"type":"string","enum":["and","or"]},"match_order":{"type":"boolean"},"is_default":{"type":"boolean"},"location":{"type":"string","enum":["header","body","url"]},"model_type":{"type":"string"},"model_id":{"type":"integer"},"date_format":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"field":{"type":"string"},"is_active":{"type":"boolean"}}},"DataPool":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"name":{"type":"string"},"description":{"type":"string"},"data_pool_template_id":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"FlowStepRoute":{"type":"object","properties":{"id":{"type":"integer"},"flow_step_id":{"type":"integer"},"name":{"type":"string"},"first_step_id":{"type":"integer"},"filter_logic_operator":{"type":"string","enum":["and","or"]},"filters":{"type":"array","items":{"$ref":"#/components/schemas/Filters"}},"first_step":{"$ref":"#/components/schemas/FlowSteps"},"order":{"type":"string"}}},"Caches":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"scope":{"type":"string","enum":["Flow run","Flow","Company"]},"ttl":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"flow_id":{"type":"integer"},"cache_template_id":{"type":"integer"},"content":{"type":"string"},"ttl_unit":{"type":"string"},"ttl_number":{"type":"string"},"flow":{"type":"object"}}},"PayloadMetadata":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"flow_version_id":{"type":"integer"},"flow_step_id":{"type":"integer"},"flow_run_id":{"type":"string"},"payload_store_reference":{"type":"string"},"payload_size":{"type":"string"},"dropped":{"type":"boolean"}}},"MessageBrokers":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"description":{"type":"string"},"host":{"type":"string","items":{"type":"object"}},"port":{"type":"integer","items":{"type":"object"}},"protocol":{"type":"string","enum":["AMQP-0-9-1","AMQP 1.0","IBM MQ","MQTT","STOMP"],"items":{"type":"object"}},"auth_type":{"type":"string","items":{"type":"object"},"enum":["Basic","x.509 Certificate"]},"variables":{"type":"array","items":{"$ref":"#/components/schemas/Variables"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"flows":{"type":"array","items":{"$ref":"#/components/schemas/Flows"}},"message_broker_queues":{"type":"array","items":{"$ref":"#/components/schemas/MessageBrokerQueues"}},"message_broker_queues_count":{"type":"array","items":{"type":"object"}},"flow_message_broker_queues":{"type":"array","items":{"$ref":"#/components/schemas/FlowMessageBrokerQueue"}},"certificate":{"$ref":"#/components/schemas/Certificates"}}},"MessageBrokerQueues":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier"},"flow_id":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"array","items":{"type":"object"}},"message_broker_id":{"type":"integer"},"flows":{"type":"array","items":{"$ref":"#/components/schemas/Flows"}},"message_broker":{"$ref":"#/components/schemas/MessageBrokers"},"consumer_type":{"type":"string","enum":["queue","topic"]},"subscription_name":{"type":"string"},"flows_count":{"type":"integer"},"user":{"type":"object"}}},"FlowMessageBrokerQueue":{"type":"object","properties":{"id":{"type":"integer"},"flow_id":{"type":"integer"},"message_broker_id":{"type":"integer"},"message_broker_queue_id":{"type":"string"},"last_error":{"type":"string"},"name":{"type":"string"},"message_broker":{"type":"object"},"flow":{"type":"object"}}},"FlowNotificationGroup":{"type":"object","properties":{"flow_id":{"type":"integer"},"notification_group_id":{"type":"integer"}}},"PaginationMeta":{"type":"object","properties":{"current_page":{"type":"integer"},"from":{"type":"integer","nullable":true},"last_page":{"type":"integer"},"path":{"type":"string"},"per_page":{"type":"integer"},"to":{"type":"integer","nullable":true},"total":{"type":"integer"}}},"PaginationLinks":{"type":"object","properties":{"first":{"type":"string","format":"uri"},"last":{"type":"string","format":"uri"},"prev":{"type":"string","format":"uri","nullable":true},"next":{"type":"string","format":"uri","nullable":true}}},"MessageResponse":{"type":"object","properties":{"message":{"type":"string"}}}}},"paths":{"/api/v1/flows/{flow}/versions":{"get":{"summary":"List Flow Versions","description":"Retrieves a paginated list of all versions for a specific flow.","parameters":[{"name":"flow","in":"path","required":true,"schema":{"type":"string"},"description":"The flow identifier."},{"name":"include","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","enum":["savedByUser","deployedByUser","steps","runs","latestRun","schedules","filters","variables"]}},"description":"Comma-separated list of relationships to include. Available: savedByUser, deployedByUser, steps, runs, latestRun, schedules, filters, variables","style":"form","explode":false},{"name":"sort","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","enum":["created_at","-created_at"]}},"description":"Sort field. Prefix with - for descending. Available: created_at","style":"form","explode":false},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1},"description":"Page number for pagination."},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100},"description":"Number of results per page."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowsListResponse"}}}},"401":{"description":"Unauthenticated"},"403":{"description":"Unauthorized"},"404":{"description":"Not Found. The record does not exist.","content":{"application/json":{"schema":{"type":"string"}}}},"429":{"description":"Too Many Requests. The rate limit for this user has been reached.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current minute.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}}},"tags":["Flow Versions"],"operationId":"flowsVersionsIndex"}}}}
```

## Create Flow Version

> Creates a new draft version of a flow. Intended for use when a flow has no existing versions.

```json
{"openapi":"3.0.0","info":{"title":"Patchworks Core API","version":"1.0.0"},"tags":[{"name":"Flow Versions"}],"servers":[{"url":"https://core.wearepatchworks.com"}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"API key passed in the Authorization header. Format: `<api-key>`"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2 Bearer token obtained from POST /fabric/api/login"}},"schemas":{"FlowsResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Flows"}}},"Flows":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"name":{"type":"string"},"enabled_at":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["Draft","Inactive","Deployed"]},"format":{"type":"string","enum":["csv","json","txt","xml"]},"body":{"type":"string"},"deployed_at":{"type":"string"},"labels":{"type":"array","items":{"$ref":"#/components/schemas/Labels"}},"notification_groups":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"description":{"type":"string"},"layout_direction":{"type":"string"},"is_enabled":{"type":"boolean"},"latest_version":{"$ref":"#/components/schemas/FlowVersions"},"current_version":{"$ref":"#/components/schemas/FlowVersions"},"deployed_version":{"$ref":"#/components/schemas/FlowVersions"},"latest_deployed_version":{"$ref":"#/components/schemas/FlowVersions"},"versions":{"type":"array","items":{"$ref":"#/components/schemas/FlowVersions"}},"version_type_counts":{"type":"array","items":{"type":"object"}},"message_brokers":{"type":"array","items":{"$ref":"#/components/schemas/MessageBrokers"}},"message_broker_queues":{"type":"array","items":{"$ref":"#/components/schemas/MessageBrokerQueues"}},"notification_group_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlowNotificationGroup"}},"webhooks":{"type":"array","items":{"type":"object"}},"callbacks":{"type":"array","items":{"type":"object"}},"current_version_step_count":{"type":"integer"},"current_version_connector_count":{"type":"integer"},"current_version_script_count":{"type":"integer"},"current_version_cache_count":{"type":"integer"},"current_version_data_pool_count":{"type":"integer"},"current_version_cross_ref_count":{"type":"integer"},"use_queued_time":{"type":"boolean"},"remove_failed_payloads":{"type":"boolean"},"priority":{"type":"array","items":{"type":"object"}},"prod_flag":{"type":"boolean"},"deployments":{"type":"array","items":{"$ref":"#/components/schemas/FlowVersionDeployment"}},"webhooks_count":{"type":"integer"},"callbacks_count":{"type":"integer"},"marketplace_app_id":{"type":"integer"},"blueprint_id":{"type":"integer"},"blueprint_version_number":{"type":"string"},"flow_folder_id":{"type":"integer"},"flow_message_broker_queues":{"type":"array","items":{"$ref":"#/components/schemas/FlowMessageBrokerQueue"}},"max_concurrency":{"type":"integer"}}},"Labels":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier"},"colour":{"type":"string","enum":["blue","blue_inverted","cyan","cyan_inverted","gray","gray_inverted","green","green_inverted","orange","orange_inverted","pink","pink_inverted","purple","purple_inverted","red","red_inverted","yellow","yellow_inverted"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"}}},"FlowVersions":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"virtual_environment_id":{"type":"string"},"flow_version_id":{"type":"string"},"priority":{"type":"integer"},"cron_string":{"type":"string"},"microservice":{"type":"string"},"config":{"type":"string"},"flow_step_route_id":{"type":"integer"},"variables":{"type":"array","items":{"$ref":"#/components/schemas/FlowVersionVariable"}},"parent_id":{"type":"integer"},"type":{"type":"string"},"key":{"type":"string"},"value":{"type":"string"},"date_format":{"type":"string"},"secret":{"type":"string"},"enabled_at":{"type":"string"},"created_at":{"type":"string","format":"date-time","items":{"type":"object"}},"updated_at":{"type":"string","format":"date-time","items":{"type":"object"}},"flow_id":{"type":"integer"},"flow_name":{"type":"string"},"flow_priority":{"type":"string"},"iteration":{"type":"integer"},"status":{"type":"string","enum":["Draft","Inactive","Deployed"]},"is_deployed":{"type":"boolean"},"is_editable":{"type":"boolean"},"deployed_at":{"type":"string","format":"date-time"},"deployed_by":{"type":"object"},"deployed_by_user":{"type":"object"},"deployments":{"type":"array","items":{"$ref":"#/components/schemas/FlowVersionDeployment"}},"has_callback_step":{"type":"boolean"},"steps":{"type":"array","items":{"$ref":"#/components/schemas/FlowSteps"}},"runs":{"type":"array","items":{"type":"object"}},"latest_run":{"type":"string"},"schedules":{"type":"array","items":{"type":"object"}},"filters":{"type":"array","items":{"type":"object"}},"steps_count":{"type":"array","items":{"type":"object"}},"pivot":{"type":"string"},"saved_at":{"type":"string","format":"date-time"},"saved_by":{"type":"string"},"saved_by_user":{"type":"object"}}},"FlowVersionVariable":{"type":"object","properties":{"id":{"type":"integer"},"type":{"type":"string","enum":["string","number","absolute date","relative date","boolean"]},"value":{"type":"string"},"key":{"type":"string"},"date_format":{"type":"string"},"secret":{"type":"boolean"}}},"FlowVersionDeployment":{"type":"object","properties":{"id":{"type":"integer"},"flow_version_id":{"type":"integer"},"flow_version":{"$ref":"#/components/schemas/FlowVersions"},"virtual_environment_id":{"type":"integer"},"virtual_environment":{"$ref":"#/components/schemas/VirtualEnvironments"},"enabled_by":{"type":"string"},"enabled_by_user":{"type":"object"},"enabled_at":{"type":"string","format":"date-time"},"package_id":{"type":"integer"},"package":{"$ref":"#/components/schemas/Packages"},"user_id":{"type":"integer"},"user":{"type":"object"},"priority":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"VirtualEnvironments":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"notes":{"type":"string"},"deployed_at":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string"},"name":{"type":"string","items":{"type":"object"}},"description":{"type":"string","items":{"type":"object"}},"type":{"type":"string","items":{"type":"object"},"enum":["LIVE","TEST"]},"deployments":{"type":"array","items":{"$ref":"#/components/schemas/FlowVersionDeployment"}},"versions":{"type":"array","items":{"$ref":"#/components/schemas/VirtualEnvironmentVersions"}},"versions_count":{"type":"integer"},"first_version":{"$ref":"#/components/schemas/VirtualEnvironmentVersions"},"deployed_version":{"$ref":"#/components/schemas/VirtualEnvironmentVersions"},"flows":{"type":"string"},"is_deployed":{"type":"boolean"},"deployments_count":{"type":"array","items":{"type":"object"}},"pivot":{"type":"array","items":{"type":"object"}},"package_deployments":{"type":"array","items":{"$ref":"#/components/schemas/PackageVirtualEnvironment"}},"labels":{"type":"array","items":{"$ref":"#/components/schemas/Labels"}}}},"VirtualEnvironmentVersions":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"flow_id":{"type":"string"},"priority":{"type":"integer"},"model_type":{"type":"string"},"original_model_id":{"type":"string"},"replacement_model_id":{"type":"string"},"type":{"type":"string"},"key":{"type":"string"},"value":{"type":"string"},"fallback":{"type":"string"},"date_format":{"type":"string"},"secret":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"version":{"type":"object"},"virtual_environment_id":{"type":"integer"},"virtual_environment":{"$ref":"#/components/schemas/VirtualEnvironments"},"status":{"type":"string","enum":["Draft","Inactive","Deployed"]},"deployed_at":{"type":"string","format":"date-time"},"deployed_by":{"type":"array","items":{"type":"object"}},"notes":{"type":"array","items":{"type":"object"}},"manifests":{"type":"array","items":{"$ref":"#/components/schemas/VirtualEnvironmentVersionManifest"}},"variables":{"type":"array","items":{"$ref":"#/components/schemas/VirtualEnvironmentVersionVariable"}},"counts":{"type":"string"},"user_id":{"type":"object"},"user":{"type":"object"}}},"VirtualEnvironmentVersionManifest":{"type":"object","properties":{"id":{"type":"integer"},"virtual_environment_version_id":{"type":"integer"},"virtual_environment_version":{"$ref":"#/components/schemas/VirtualEnvironmentVersions"},"model_type":{"type":"string"},"original_model_id":{"type":"integer"},"original_model":{},"replacement_model_id":{"type":"integer"},"replacement_model":{},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"VirtualEnvironmentVersionVariable":{"type":"object","properties":{"id":{"type":"integer"},"virtual_environment_version_id":{"type":"integer"},"type":{"type":"string"},"value":{"type":"string"},"fallback":{"type":"string"},"key":{"type":"string"},"date_format":{"type":"string"},"secret":{"type":"boolean"}}},"PackageVirtualEnvironment":{"type":"object","properties":{"user":{"type":"object"},"package":{"$ref":"#/components/schemas/Packages"}}},"Packages":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"name":{"type":"string"},"notes":{"type":"string"},"created_by":{"type":"string","items":{"type":"object"}},"priority":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"created_by_user":{"type":"object"},"flow_versions":{"type":"array","items":{"$ref":"#/components/schemas/FlowVersions"}},"virtual_environments":{"type":"array","items":{"$ref":"#/components/schemas/VirtualEnvironments"}},"deployments":{"type":"array","items":{"$ref":"#/components/schemas/PackageVirtualEnvironment"}},"flow_versions_count":{"type":"integer"},"deployments_count":{"type":"integer"},"flow_version_deployments_count":{"type":"integer"}}},"FlowSteps":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"first_step_id":{"type":"string"},"filter_logic_operator":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"flow_version_id":{"type":"integer"},"name":{"type":"string"},"microservice":{"type":"object","enum":["gateway","trigger","start","connector","pull","push","map","filter","route","script","manual-payload","assert-payload","split","batch","dedupe","cache","cache-set","cache-get","track","variable-set","run-flow","logging","events","notify","try-catch","branch","callback","data-transform","medium-processor","long-processor","scheduler","cross-reference"]},"config":{"type":"object"},"parent_id":{"type":"object"},"flow_version":{"$ref":"#/components/schemas/FlowVersions"},"children":{"type":"object"},"endpoint":{"$ref":"#/components/schemas/Endpoints"},"connector":{"$ref":"#/components/schemas/Connectors"},"data_pool":{"$ref":"#/components/schemas/DataPool"},"filters":{"type":"array","items":{"$ref":"#/components/schemas/Filters"}},"parent_flow_step":{"$ref":"#/components/schemas/FlowSteps"},"routes":{"type":"array","items":{"$ref":"#/components/schemas/FlowStepRoute"}},"variables":{"type":"array","items":{"$ref":"#/components/schemas/Variables"}},"script_version":{"$ref":"#/components/schemas/ScriptVersions"},"cache":{"$ref":"#/components/schemas/Caches"},"payloads":{"type":"array","items":{"$ref":"#/components/schemas/PayloadMetadata"}},"flow":{"$ref":"#/components/schemas/Flows"},"cross_references":{"type":"string"},"notes_count":{"type":"object"},"notification_group":{"type":"object"},"order":{"type":"string"}}},"Endpoints":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"field_path":{"type":"string"},"tags":{"type":"string"},"label":{"type":"string"},"key":{"type":"string"},"value":{"type":"string"},"secret":{"type":"string"},"variables":{"type":"array","items":{"$ref":"#/components/schemas/Variables"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"object"},"system_id":{"type":"integer"},"system":{"$ref":"#/components/schemas/Systems"},"entity_type_id":{"type":"integer"},"entity_type":{"$ref":"#/components/schemas/EntityType"},"endpoint":{"type":"string"},"http_method":{"type":"string","enum":["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"]},"data_type":{"type":"string","enum":["csv","json","txt","xml"]},"pagination_method":{"type":"string","enum":["Custom relative URI","Link Header","Next page token","Next Page URL","Page number parameter","Limit offset","default","PeopleVox","NetSuite SOAP","GraphQL Cursor","Database limit offset","Script"]},"deprecated_at":{"type":"string","format":"date-time"},"direction":{"type":"string","enum":["Send","Receive"]},"returns_multiple_records":{"type":"boolean"},"pre_script_version_id":{"type":"string"},"post_script_version_id":{"type":"string"},"endpoint_schema":{"$ref":"#/components/schemas/EndpointSchema"},"field_tags":{"type":"array","items":{"type":"object"}},"data_path":{"type":"array","items":{"type":"object"}},"body_format":{"type":"array","items":{"type":"object"},"enum":["none","form-data","raw","text"]},"raw_body":{"type":"array","items":{"type":"object"}},"filters":{"type":"array","items":{"$ref":"#/components/schemas/Filters"}},"modified":{"type":"array","items":{"type":"object"}},"help_link":{"type":"array","items":{"type":"object"}},"authentication_implementations":{"type":"array","items":{"$ref":"#/components/schemas/AuthenticationImplementations"}},"pre_script_version":{"$ref":"#/components/schemas/ScriptVersions"},"post_script_version":{"$ref":"#/components/schemas/ScriptVersions"},"disable_header_addition":{"type":"boolean"},"response_encoding":{"type":"string","enum":["base64","none"]}}},"Variables":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier"},"label":{"type":"string"},"key":{"type":"string"},"value":{"type":"string"},"secret":{"type":"boolean"},"locked":{"type":"boolean"},"configurable":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"modified":{"type":"string"},"pivot":{"type":"object"},"required":{"type":"boolean"},"advanced":{"type":"boolean"},"alias":{"type":"string"}}},"Systems":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"name":{"type":"string"},"entity_type_id":{"type":"integer"},"direction":{"type":"string","enum":["Send","Receive"]},"http_method":{"type":"string","enum":["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"]},"label":{"type":"string"},"colour":{"type":"string","enum":["blue","blue_inverted","cyan","cyan_inverted","gray","gray_inverted","green","green_inverted","orange","orange_inverted","pink","pink_inverted","purple","purple_inverted","red","red_inverted","yellow","yellow_inverted"]},"system_template_id":{"type":"integer"},"version":{"type":"integer"},"version_name":{"type":"string"},"system_type_id":{"type":"integer"},"protocol":{"type":"string","enum":["HTTP","FTP","SFTP","FTPS","S3","MySQL","PGSQL","SQLSRV","PUBLIC","OCI"]},"date_format":{"type":"string"},"help_link":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"rate_limit_unit":{"type":"string","enum":["second","minute","hour","day"]},"rate_limit_duration":{"type":"integer"},"endpoint":{"type":"string"},"method":{"type":"string"},"data_type":{"type":"string","enum":["csv","json","txt","xml"]},"body_format":{"type":"string","enum":["none","form-data","raw","text"]},"additional_endpoint_1":{"type":"string"},"additional_endpoint_2":{"type":"string"},"timeout":{"type":"integer"},"authentication_type_id":{"type":"string"},"returns_multiple_records":{"type":"string"},"pagination_method":{"type":"string","enum":["Custom relative URI","Link Header","Next page token","Next Page URL","Page number parameter","Limit offset","default","PeopleVox","NetSuite SOAP","GraphQL Cursor","Database limit offset","Script"]},"schema":{"type":"string"},"endpoint_template_id":{"type":"integer"},"data_path":{"type":"string"},"raw_body":{"type":"string"},"deprecated_at":{"type":"string"},"disable_header_addition":{"type":"string"},"response_encoding":{"type":"string","enum":["base64","none"]},"key":{"type":"string"},"value":{"type":"string"},"secret":{"type":"string"},"logo":{"$ref":"#/components/schemas/MediaFiles"},"pre_script_version_id":{"type":"string"},"post_script_version_id":{"type":"string"},"canonical_key":{"type":"array","items":{"type":"object"}},"connectors":{"type":"array","items":{"$ref":"#/components/schemas/Connectors"}},"system_type":{"$ref":"#/components/schemas/SystemType","enum":["Accounting","CRM","eCommerce","ERP","Marketplaces","Other","PIM","POS","3PL","WMS","Database"]},"system_template":{"$ref":"#/components/schemas/SystemTemplates"},"authentication_implementations":{"type":"array","items":{"$ref":"#/components/schemas/AuthenticationImplementations"}},"authentication_implementations_count":{"type":"array","items":{"type":"object"}},"endpoints":{"type":"array","items":{"$ref":"#/components/schemas/Endpoints"}},"variables":{"type":"array","items":{"$ref":"#/components/schemas/Variables"}},"updatable":{"type":"string"},"modified":{"type":"string"},"is_deployed":{"type":"boolean"}}},"MediaFiles":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"model_type":{"type":"string"},"model_id":{"type":"integer"},"file_name":{"type":"string"},"mime_type":{"type":"string"},"expires_at":{"type":"string","format":"date-time"},"is_expired":{"type":"boolean"}}},"Connectors":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"authentication_implementation_id":{"type":"integer"},"timezone":{"type":"string"},"date_format":{"type":"string"},"rate_limit_unit":{"type":"string","enum":["second","minute","hour","day"]},"rate_limit_duration":{"type":"integer"},"connection_pool_id":{"type":"integer"},"variables":{"type":"array","items":{"$ref":"#/components/schemas/Variables"}},"session_id":{"type":"string"},"platform_app_key":{"type":"string"},"certificate_id":{"type":"string"},"type":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"authentication_implementation":{"$ref":"#/components/schemas/AuthenticationImplementations"},"system":{"$ref":"#/components/schemas/Systems"},"certificate":{"$ref":"#/components/schemas/Certificates"}}},"AuthenticationImplementations":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"endpoint_ids":{"type":"string"},"label":{"type":"string"},"key":{"type":"string"},"value":{"type":"string"},"secret":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"endpoint":{"type":"string"},"method":{"type":"string"},"additional_endpoint_1":{"type":"string"},"additional_endpoint_2":{"type":"string"},"authentication_type_id":{"type":"integer"},"authentication_implementation_template_id":{"type":"integer"},"authentication_type":{"$ref":"#/components/schemas/AuthenticationType"},"system_id":{"type":"integer"},"body_format":{"type":"string","enum":["none","form-data","raw","text"]},"data_type":{"type":"string","enum":["csv","json","txt","xml"]},"pre_script_version_id":{"type":"string"},"post_script_version_id":{"type":"string"},"timeout":{"type":"integer"},"system":{"$ref":"#/components/schemas/Systems"},"variables":{"type":"array","items":{"$ref":"#/components/schemas/Variables"}},"endpoints":{"type":"array","items":{"$ref":"#/components/schemas/Endpoints"}},"pre_script_version":{"$ref":"#/components/schemas/ScriptVersions"},"post_script_version":{"$ref":"#/components/schemas/ScriptVersions"},"modified":{"type":"string"},"help_link":{"type":"string"},"disable_token_url_parameters":{"type":"boolean"}}},"AuthenticationType":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"label":{"type":"string"},"is_enabled":{"type":"boolean"},"hidden":{"type":"boolean"},"protocol":{"type":"string","enum":["HTTP","FTP","SFTP","FTPS","S3","MySQL","PGSQL","SQLSRV","PUBLIC","OCI"]}}},"ScriptVersions":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"script_id":{"type":"string"},"name":{"type":"string"},"version":{"type":"integer"},"status":{"type":"string","enum":["Draft","Inactive","Deployed"]},"deployment_failure_reason":{"type":"string"},"last_invoked_on":{"type":"string"},"deployed_at":{"type":"string","format":"date-time"},"deployment_failed_at":{"type":"string","format":"date-time"},"deploying":{"type":"boolean"},"content":{"type":"object"},"script":{"$ref":"#/components/schemas/Scripts"},"deployment_failure_detail":{"type":"string"},"is_draft":{"type":"boolean"}}},"Scripts":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier"},"script_template_id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string","items":{"type":"object"}},"language":{"type":"string","items":{"type":"object"},"enum":["c_sharp_8_0","go_1_18","go_1_23","go_1_26","rust_1_82","rust_1_94","node_18","node_20","node_22","node_24","php_8_1","php_8_2","php_8_3","php_8_4","php_8_5","python_3","mcp","ruby_3"]},"created_at":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"script_id":{"type":"integer"},"version":{"type":"string"},"deployed_at":{"type":"string"},"deployment_failed_at":{"type":"string"},"deploying":{"type":"string"},"deployment_failure_reason":{"type":"string"},"content":{"type":"string"},"ai_created":{"type":"boolean"},"value":{"type":"string"},"versions":{"type":"array","items":{"$ref":"#/components/schemas/ScriptVersions"}},"latest_version":{"$ref":"#/components/schemas/ScriptVersions"},"type":{"type":"string","enum":["custom","pre_auth","post_auth","pre_request","post_request","pagination"]},"updated_by":{"type":"string"},"updated_by_user":{"type":"string"},"versions_count":{"type":"integer"},"versions_remaining":{"type":"string"},"max_versions":{"type":"string"},"unlimited_versions":{"type":"boolean"}}},"Certificates":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"connector_id":{"type":"integer"},"certificate":{"type":"string"},"passphrase":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"object"},"user_id":{"type":"object"},"connector":{"$ref":"#/components/schemas/Connectors"},"user":{"type":"object"},"message_broker_id":{"type":"integer"}}},"SystemType":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"label":{"type":"string"},"system_templates":{"type":"array","items":{"$ref":"#/components/schemas/SystemTemplates"}}}},"SystemTemplates":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"label":{"type":"string"},"colour":{"type":"string","enum":["blue","blue_inverted","cyan","cyan_inverted","gray","gray_inverted","green","green_inverted","orange","orange_inverted","pink","pink_inverted","purple","purple_inverted","red","red_inverted","yellow","yellow_inverted"]},"logo_url":{"type":"string"},"version":{"type":"integer"},"version_name":{"type":"string"},"rate_limit_unit":{"type":"string","enum":["second","minute","hour","day"]},"protocol":{"type":"object","enum":["HTTP","FTP","SFTP","FTPS","S3","MySQL","PGSQL","SQLSRV","PUBLIC","OCI"]},"rate_limit_duration":{"type":"integer"},"system_type_id":{"type":"integer"},"system_type":{"$ref":"#/components/schemas/SystemType","enum":["Accounting","CRM","eCommerce","ERP","Marketplaces","Other","PIM","POS","3PL","WMS","Database"]},"date_format":{"type":"string"},"canonical_key":{"type":"object"},"company_id":{"type":"object"},"public_company_id":{"type":"object"},"company":{"type":"object"},"public_company":{"type":"object"},"logo":{"$ref":"#/components/schemas/MediaFiles"},"instances":{"type":"array","items":{"type":"object"}},"authentication_implementation_templates":{"type":"array","items":{"type":"object"}},"marketplace_company_id":{"type":"object"},"marketplace_company":{"type":"object"},"help_link":{"type":"string"}}},"EntityType":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"label":{"type":"string"}}},"EndpointSchema":{"type":"object","properties":{"id":{"type":"integer"},"endpoint_id":{"type":"integer"},"endpoint":{"$ref":"#/components/schemas/Endpoints"},"schema":{"type":"string"}}},"Filters":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"type":{"type":"string","enum":["string","string_length","number","absolute date","relative date","XPath","boolean","null","variable","array","array_length"]},"comparison":{"type":"string","enum":[">","<","==","<=",">=","!=","*","!*","NOT NULL","IS NULL","*[]","!*[]","regex"]},"value":{"type":"string"},"value_type":{"type":"string","enum":["string","integer","float","boolean","date"]},"keep_matching":{"type":"boolean"},"operator_logic":{"type":"string","enum":["and","or"]},"match_order":{"type":"boolean"},"is_default":{"type":"boolean"},"location":{"type":"string","enum":["header","body","url"]},"model_type":{"type":"string"},"model_id":{"type":"integer"},"date_format":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"field":{"type":"string"},"is_active":{"type":"boolean"}}},"DataPool":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"name":{"type":"string"},"description":{"type":"string"},"data_pool_template_id":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"FlowStepRoute":{"type":"object","properties":{"id":{"type":"integer"},"flow_step_id":{"type":"integer"},"name":{"type":"string"},"first_step_id":{"type":"integer"},"filter_logic_operator":{"type":"string","enum":["and","or"]},"filters":{"type":"array","items":{"$ref":"#/components/schemas/Filters"}},"first_step":{"$ref":"#/components/schemas/FlowSteps"},"order":{"type":"string"}}},"Caches":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"scope":{"type":"string","enum":["Flow run","Flow","Company"]},"ttl":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"flow_id":{"type":"integer"},"cache_template_id":{"type":"integer"},"content":{"type":"string"},"ttl_unit":{"type":"string"},"ttl_number":{"type":"string"},"flow":{"type":"object"}}},"PayloadMetadata":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"flow_version_id":{"type":"integer"},"flow_step_id":{"type":"integer"},"flow_run_id":{"type":"string"},"payload_store_reference":{"type":"string"},"payload_size":{"type":"string"},"dropped":{"type":"boolean"}}},"MessageBrokers":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"description":{"type":"string"},"host":{"type":"string","items":{"type":"object"}},"port":{"type":"integer","items":{"type":"object"}},"protocol":{"type":"string","enum":["AMQP-0-9-1","AMQP 1.0","IBM MQ","MQTT","STOMP"],"items":{"type":"object"}},"auth_type":{"type":"string","items":{"type":"object"},"enum":["Basic","x.509 Certificate"]},"variables":{"type":"array","items":{"$ref":"#/components/schemas/Variables"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"flows":{"type":"array","items":{"$ref":"#/components/schemas/Flows"}},"message_broker_queues":{"type":"array","items":{"$ref":"#/components/schemas/MessageBrokerQueues"}},"message_broker_queues_count":{"type":"array","items":{"type":"object"}},"flow_message_broker_queues":{"type":"array","items":{"$ref":"#/components/schemas/FlowMessageBrokerQueue"}},"certificate":{"$ref":"#/components/schemas/Certificates"}}},"MessageBrokerQueues":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier"},"flow_id":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"array","items":{"type":"object"}},"message_broker_id":{"type":"integer"},"flows":{"type":"array","items":{"$ref":"#/components/schemas/Flows"}},"message_broker":{"$ref":"#/components/schemas/MessageBrokers"},"consumer_type":{"type":"string","enum":["queue","topic"]},"subscription_name":{"type":"string"},"flows_count":{"type":"integer"},"user":{"type":"object"}}},"FlowMessageBrokerQueue":{"type":"object","properties":{"id":{"type":"integer"},"flow_id":{"type":"integer"},"message_broker_id":{"type":"integer"},"message_broker_queue_id":{"type":"string"},"last_error":{"type":"string"},"name":{"type":"string"},"message_broker":{"type":"object"},"flow":{"type":"object"}}},"FlowNotificationGroup":{"type":"object","properties":{"flow_id":{"type":"integer"},"notification_group_id":{"type":"integer"}}},"ErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}},"MessageResponse":{"type":"object","properties":{"message":{"type":"string"}}}}},"paths":{"/api/v1/flows/{flow}/versions":{"post":{"summary":"Create Flow Version","description":"Creates a new draft version of a flow. Intended for use when a flow has no existing versions.","parameters":[{"name":"flow","in":"path","required":true,"schema":{"type":"string"},"description":"The flow identifier."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowsResponse"}}}},"401":{"description":"Unauthenticated"},"403":{"description":"Unauthorized"},"404":{"description":"Not Found. The record does not exist.","content":{"application/json":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests. The rate limit for this user has been reached.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current minute.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}}},"tags":["Flow Versions"],"operationId":"flowsVersionsStore"}}}}
```

## Get Flow Version

> Retrieves the details of a specific flow version.

```json
{"openapi":"3.0.0","info":{"title":"Patchworks Core API","version":"1.0.0"},"tags":[{"name":"Flow Versions"}],"servers":[{"url":"https://core.wearepatchworks.com"}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"API key passed in the Authorization header. Format: `<api-key>`"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2 Bearer token obtained from POST /fabric/api/login"}},"schemas":{"FlowsResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Flows"}}},"Flows":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"name":{"type":"string"},"enabled_at":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["Draft","Inactive","Deployed"]},"format":{"type":"string","enum":["csv","json","txt","xml"]},"body":{"type":"string"},"deployed_at":{"type":"string"},"labels":{"type":"array","items":{"$ref":"#/components/schemas/Labels"}},"notification_groups":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"description":{"type":"string"},"layout_direction":{"type":"string"},"is_enabled":{"type":"boolean"},"latest_version":{"$ref":"#/components/schemas/FlowVersions"},"current_version":{"$ref":"#/components/schemas/FlowVersions"},"deployed_version":{"$ref":"#/components/schemas/FlowVersions"},"latest_deployed_version":{"$ref":"#/components/schemas/FlowVersions"},"versions":{"type":"array","items":{"$ref":"#/components/schemas/FlowVersions"}},"version_type_counts":{"type":"array","items":{"type":"object"}},"message_brokers":{"type":"array","items":{"$ref":"#/components/schemas/MessageBrokers"}},"message_broker_queues":{"type":"array","items":{"$ref":"#/components/schemas/MessageBrokerQueues"}},"notification_group_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlowNotificationGroup"}},"webhooks":{"type":"array","items":{"type":"object"}},"callbacks":{"type":"array","items":{"type":"object"}},"current_version_step_count":{"type":"integer"},"current_version_connector_count":{"type":"integer"},"current_version_script_count":{"type":"integer"},"current_version_cache_count":{"type":"integer"},"current_version_data_pool_count":{"type":"integer"},"current_version_cross_ref_count":{"type":"integer"},"use_queued_time":{"type":"boolean"},"remove_failed_payloads":{"type":"boolean"},"priority":{"type":"array","items":{"type":"object"}},"prod_flag":{"type":"boolean"},"deployments":{"type":"array","items":{"$ref":"#/components/schemas/FlowVersionDeployment"}},"webhooks_count":{"type":"integer"},"callbacks_count":{"type":"integer"},"marketplace_app_id":{"type":"integer"},"blueprint_id":{"type":"integer"},"blueprint_version_number":{"type":"string"},"flow_folder_id":{"type":"integer"},"flow_message_broker_queues":{"type":"array","items":{"$ref":"#/components/schemas/FlowMessageBrokerQueue"}},"max_concurrency":{"type":"integer"}}},"Labels":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier"},"colour":{"type":"string","enum":["blue","blue_inverted","cyan","cyan_inverted","gray","gray_inverted","green","green_inverted","orange","orange_inverted","pink","pink_inverted","purple","purple_inverted","red","red_inverted","yellow","yellow_inverted"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"}}},"FlowVersions":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"virtual_environment_id":{"type":"string"},"flow_version_id":{"type":"string"},"priority":{"type":"integer"},"cron_string":{"type":"string"},"microservice":{"type":"string"},"config":{"type":"string"},"flow_step_route_id":{"type":"integer"},"variables":{"type":"array","items":{"$ref":"#/components/schemas/FlowVersionVariable"}},"parent_id":{"type":"integer"},"type":{"type":"string"},"key":{"type":"string"},"value":{"type":"string"},"date_format":{"type":"string"},"secret":{"type":"string"},"enabled_at":{"type":"string"},"created_at":{"type":"string","format":"date-time","items":{"type":"object"}},"updated_at":{"type":"string","format":"date-time","items":{"type":"object"}},"flow_id":{"type":"integer"},"flow_name":{"type":"string"},"flow_priority":{"type":"string"},"iteration":{"type":"integer"},"status":{"type":"string","enum":["Draft","Inactive","Deployed"]},"is_deployed":{"type":"boolean"},"is_editable":{"type":"boolean"},"deployed_at":{"type":"string","format":"date-time"},"deployed_by":{"type":"object"},"deployed_by_user":{"type":"object"},"deployments":{"type":"array","items":{"$ref":"#/components/schemas/FlowVersionDeployment"}},"has_callback_step":{"type":"boolean"},"steps":{"type":"array","items":{"$ref":"#/components/schemas/FlowSteps"}},"runs":{"type":"array","items":{"type":"object"}},"latest_run":{"type":"string"},"schedules":{"type":"array","items":{"type":"object"}},"filters":{"type":"array","items":{"type":"object"}},"steps_count":{"type":"array","items":{"type":"object"}},"pivot":{"type":"string"},"saved_at":{"type":"string","format":"date-time"},"saved_by":{"type":"string"},"saved_by_user":{"type":"object"}}},"FlowVersionVariable":{"type":"object","properties":{"id":{"type":"integer"},"type":{"type":"string","enum":["string","number","absolute date","relative date","boolean"]},"value":{"type":"string"},"key":{"type":"string"},"date_format":{"type":"string"},"secret":{"type":"boolean"}}},"FlowVersionDeployment":{"type":"object","properties":{"id":{"type":"integer"},"flow_version_id":{"type":"integer"},"flow_version":{"$ref":"#/components/schemas/FlowVersions"},"virtual_environment_id":{"type":"integer"},"virtual_environment":{"$ref":"#/components/schemas/VirtualEnvironments"},"enabled_by":{"type":"string"},"enabled_by_user":{"type":"object"},"enabled_at":{"type":"string","format":"date-time"},"package_id":{"type":"integer"},"package":{"$ref":"#/components/schemas/Packages"},"user_id":{"type":"integer"},"user":{"type":"object"},"priority":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"VirtualEnvironments":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"notes":{"type":"string"},"deployed_at":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string"},"name":{"type":"string","items":{"type":"object"}},"description":{"type":"string","items":{"type":"object"}},"type":{"type":"string","items":{"type":"object"},"enum":["LIVE","TEST"]},"deployments":{"type":"array","items":{"$ref":"#/components/schemas/FlowVersionDeployment"}},"versions":{"type":"array","items":{"$ref":"#/components/schemas/VirtualEnvironmentVersions"}},"versions_count":{"type":"integer"},"first_version":{"$ref":"#/components/schemas/VirtualEnvironmentVersions"},"deployed_version":{"$ref":"#/components/schemas/VirtualEnvironmentVersions"},"flows":{"type":"string"},"is_deployed":{"type":"boolean"},"deployments_count":{"type":"array","items":{"type":"object"}},"pivot":{"type":"array","items":{"type":"object"}},"package_deployments":{"type":"array","items":{"$ref":"#/components/schemas/PackageVirtualEnvironment"}},"labels":{"type":"array","items":{"$ref":"#/components/schemas/Labels"}}}},"VirtualEnvironmentVersions":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"flow_id":{"type":"string"},"priority":{"type":"integer"},"model_type":{"type":"string"},"original_model_id":{"type":"string"},"replacement_model_id":{"type":"string"},"type":{"type":"string"},"key":{"type":"string"},"value":{"type":"string"},"fallback":{"type":"string"},"date_format":{"type":"string"},"secret":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"version":{"type":"object"},"virtual_environment_id":{"type":"integer"},"virtual_environment":{"$ref":"#/components/schemas/VirtualEnvironments"},"status":{"type":"string","enum":["Draft","Inactive","Deployed"]},"deployed_at":{"type":"string","format":"date-time"},"deployed_by":{"type":"array","items":{"type":"object"}},"notes":{"type":"array","items":{"type":"object"}},"manifests":{"type":"array","items":{"$ref":"#/components/schemas/VirtualEnvironmentVersionManifest"}},"variables":{"type":"array","items":{"$ref":"#/components/schemas/VirtualEnvironmentVersionVariable"}},"counts":{"type":"string"},"user_id":{"type":"object"},"user":{"type":"object"}}},"VirtualEnvironmentVersionManifest":{"type":"object","properties":{"id":{"type":"integer"},"virtual_environment_version_id":{"type":"integer"},"virtual_environment_version":{"$ref":"#/components/schemas/VirtualEnvironmentVersions"},"model_type":{"type":"string"},"original_model_id":{"type":"integer"},"original_model":{},"replacement_model_id":{"type":"integer"},"replacement_model":{},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"VirtualEnvironmentVersionVariable":{"type":"object","properties":{"id":{"type":"integer"},"virtual_environment_version_id":{"type":"integer"},"type":{"type":"string"},"value":{"type":"string"},"fallback":{"type":"string"},"key":{"type":"string"},"date_format":{"type":"string"},"secret":{"type":"boolean"}}},"PackageVirtualEnvironment":{"type":"object","properties":{"user":{"type":"object"},"package":{"$ref":"#/components/schemas/Packages"}}},"Packages":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"name":{"type":"string"},"notes":{"type":"string"},"created_by":{"type":"string","items":{"type":"object"}},"priority":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"created_by_user":{"type":"object"},"flow_versions":{"type":"array","items":{"$ref":"#/components/schemas/FlowVersions"}},"virtual_environments":{"type":"array","items":{"$ref":"#/components/schemas/VirtualEnvironments"}},"deployments":{"type":"array","items":{"$ref":"#/components/schemas/PackageVirtualEnvironment"}},"flow_versions_count":{"type":"integer"},"deployments_count":{"type":"integer"},"flow_version_deployments_count":{"type":"integer"}}},"FlowSteps":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"first_step_id":{"type":"string"},"filter_logic_operator":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"flow_version_id":{"type":"integer"},"name":{"type":"string"},"microservice":{"type":"object","enum":["gateway","trigger","start","connector","pull","push","map","filter","route","script","manual-payload","assert-payload","split","batch","dedupe","cache","cache-set","cache-get","track","variable-set","run-flow","logging","events","notify","try-catch","branch","callback","data-transform","medium-processor","long-processor","scheduler","cross-reference"]},"config":{"type":"object"},"parent_id":{"type":"object"},"flow_version":{"$ref":"#/components/schemas/FlowVersions"},"children":{"type":"object"},"endpoint":{"$ref":"#/components/schemas/Endpoints"},"connector":{"$ref":"#/components/schemas/Connectors"},"data_pool":{"$ref":"#/components/schemas/DataPool"},"filters":{"type":"array","items":{"$ref":"#/components/schemas/Filters"}},"parent_flow_step":{"$ref":"#/components/schemas/FlowSteps"},"routes":{"type":"array","items":{"$ref":"#/components/schemas/FlowStepRoute"}},"variables":{"type":"array","items":{"$ref":"#/components/schemas/Variables"}},"script_version":{"$ref":"#/components/schemas/ScriptVersions"},"cache":{"$ref":"#/components/schemas/Caches"},"payloads":{"type":"array","items":{"$ref":"#/components/schemas/PayloadMetadata"}},"flow":{"$ref":"#/components/schemas/Flows"},"cross_references":{"type":"string"},"notes_count":{"type":"object"},"notification_group":{"type":"object"},"order":{"type":"string"}}},"Endpoints":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"field_path":{"type":"string"},"tags":{"type":"string"},"label":{"type":"string"},"key":{"type":"string"},"value":{"type":"string"},"secret":{"type":"string"},"variables":{"type":"array","items":{"$ref":"#/components/schemas/Variables"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"object"},"system_id":{"type":"integer"},"system":{"$ref":"#/components/schemas/Systems"},"entity_type_id":{"type":"integer"},"entity_type":{"$ref":"#/components/schemas/EntityType"},"endpoint":{"type":"string"},"http_method":{"type":"string","enum":["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"]},"data_type":{"type":"string","enum":["csv","json","txt","xml"]},"pagination_method":{"type":"string","enum":["Custom relative URI","Link Header","Next page token","Next Page URL","Page number parameter","Limit offset","default","PeopleVox","NetSuite SOAP","GraphQL Cursor","Database limit offset","Script"]},"deprecated_at":{"type":"string","format":"date-time"},"direction":{"type":"string","enum":["Send","Receive"]},"returns_multiple_records":{"type":"boolean"},"pre_script_version_id":{"type":"string"},"post_script_version_id":{"type":"string"},"endpoint_schema":{"$ref":"#/components/schemas/EndpointSchema"},"field_tags":{"type":"array","items":{"type":"object"}},"data_path":{"type":"array","items":{"type":"object"}},"body_format":{"type":"array","items":{"type":"object"},"enum":["none","form-data","raw","text"]},"raw_body":{"type":"array","items":{"type":"object"}},"filters":{"type":"array","items":{"$ref":"#/components/schemas/Filters"}},"modified":{"type":"array","items":{"type":"object"}},"help_link":{"type":"array","items":{"type":"object"}},"authentication_implementations":{"type":"array","items":{"$ref":"#/components/schemas/AuthenticationImplementations"}},"pre_script_version":{"$ref":"#/components/schemas/ScriptVersions"},"post_script_version":{"$ref":"#/components/schemas/ScriptVersions"},"disable_header_addition":{"type":"boolean"},"response_encoding":{"type":"string","enum":["base64","none"]}}},"Variables":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier"},"label":{"type":"string"},"key":{"type":"string"},"value":{"type":"string"},"secret":{"type":"boolean"},"locked":{"type":"boolean"},"configurable":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"modified":{"type":"string"},"pivot":{"type":"object"},"required":{"type":"boolean"},"advanced":{"type":"boolean"},"alias":{"type":"string"}}},"Systems":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"name":{"type":"string"},"entity_type_id":{"type":"integer"},"direction":{"type":"string","enum":["Send","Receive"]},"http_method":{"type":"string","enum":["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"]},"label":{"type":"string"},"colour":{"type":"string","enum":["blue","blue_inverted","cyan","cyan_inverted","gray","gray_inverted","green","green_inverted","orange","orange_inverted","pink","pink_inverted","purple","purple_inverted","red","red_inverted","yellow","yellow_inverted"]},"system_template_id":{"type":"integer"},"version":{"type":"integer"},"version_name":{"type":"string"},"system_type_id":{"type":"integer"},"protocol":{"type":"string","enum":["HTTP","FTP","SFTP","FTPS","S3","MySQL","PGSQL","SQLSRV","PUBLIC","OCI"]},"date_format":{"type":"string"},"help_link":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"rate_limit_unit":{"type":"string","enum":["second","minute","hour","day"]},"rate_limit_duration":{"type":"integer"},"endpoint":{"type":"string"},"method":{"type":"string"},"data_type":{"type":"string","enum":["csv","json","txt","xml"]},"body_format":{"type":"string","enum":["none","form-data","raw","text"]},"additional_endpoint_1":{"type":"string"},"additional_endpoint_2":{"type":"string"},"timeout":{"type":"integer"},"authentication_type_id":{"type":"string"},"returns_multiple_records":{"type":"string"},"pagination_method":{"type":"string","enum":["Custom relative URI","Link Header","Next page token","Next Page URL","Page number parameter","Limit offset","default","PeopleVox","NetSuite SOAP","GraphQL Cursor","Database limit offset","Script"]},"schema":{"type":"string"},"endpoint_template_id":{"type":"integer"},"data_path":{"type":"string"},"raw_body":{"type":"string"},"deprecated_at":{"type":"string"},"disable_header_addition":{"type":"string"},"response_encoding":{"type":"string","enum":["base64","none"]},"key":{"type":"string"},"value":{"type":"string"},"secret":{"type":"string"},"logo":{"$ref":"#/components/schemas/MediaFiles"},"pre_script_version_id":{"type":"string"},"post_script_version_id":{"type":"string"},"canonical_key":{"type":"array","items":{"type":"object"}},"connectors":{"type":"array","items":{"$ref":"#/components/schemas/Connectors"}},"system_type":{"$ref":"#/components/schemas/SystemType","enum":["Accounting","CRM","eCommerce","ERP","Marketplaces","Other","PIM","POS","3PL","WMS","Database"]},"system_template":{"$ref":"#/components/schemas/SystemTemplates"},"authentication_implementations":{"type":"array","items":{"$ref":"#/components/schemas/AuthenticationImplementations"}},"authentication_implementations_count":{"type":"array","items":{"type":"object"}},"endpoints":{"type":"array","items":{"$ref":"#/components/schemas/Endpoints"}},"variables":{"type":"array","items":{"$ref":"#/components/schemas/Variables"}},"updatable":{"type":"string"},"modified":{"type":"string"},"is_deployed":{"type":"boolean"}}},"MediaFiles":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"model_type":{"type":"string"},"model_id":{"type":"integer"},"file_name":{"type":"string"},"mime_type":{"type":"string"},"expires_at":{"type":"string","format":"date-time"},"is_expired":{"type":"boolean"}}},"Connectors":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"authentication_implementation_id":{"type":"integer"},"timezone":{"type":"string"},"date_format":{"type":"string"},"rate_limit_unit":{"type":"string","enum":["second","minute","hour","day"]},"rate_limit_duration":{"type":"integer"},"connection_pool_id":{"type":"integer"},"variables":{"type":"array","items":{"$ref":"#/components/schemas/Variables"}},"session_id":{"type":"string"},"platform_app_key":{"type":"string"},"certificate_id":{"type":"string"},"type":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"authentication_implementation":{"$ref":"#/components/schemas/AuthenticationImplementations"},"system":{"$ref":"#/components/schemas/Systems"},"certificate":{"$ref":"#/components/schemas/Certificates"}}},"AuthenticationImplementations":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"endpoint_ids":{"type":"string"},"label":{"type":"string"},"key":{"type":"string"},"value":{"type":"string"},"secret":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"endpoint":{"type":"string"},"method":{"type":"string"},"additional_endpoint_1":{"type":"string"},"additional_endpoint_2":{"type":"string"},"authentication_type_id":{"type":"integer"},"authentication_implementation_template_id":{"type":"integer"},"authentication_type":{"$ref":"#/components/schemas/AuthenticationType"},"system_id":{"type":"integer"},"body_format":{"type":"string","enum":["none","form-data","raw","text"]},"data_type":{"type":"string","enum":["csv","json","txt","xml"]},"pre_script_version_id":{"type":"string"},"post_script_version_id":{"type":"string"},"timeout":{"type":"integer"},"system":{"$ref":"#/components/schemas/Systems"},"variables":{"type":"array","items":{"$ref":"#/components/schemas/Variables"}},"endpoints":{"type":"array","items":{"$ref":"#/components/schemas/Endpoints"}},"pre_script_version":{"$ref":"#/components/schemas/ScriptVersions"},"post_script_version":{"$ref":"#/components/schemas/ScriptVersions"},"modified":{"type":"string"},"help_link":{"type":"string"},"disable_token_url_parameters":{"type":"boolean"}}},"AuthenticationType":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"label":{"type":"string"},"is_enabled":{"type":"boolean"},"hidden":{"type":"boolean"},"protocol":{"type":"string","enum":["HTTP","FTP","SFTP","FTPS","S3","MySQL","PGSQL","SQLSRV","PUBLIC","OCI"]}}},"ScriptVersions":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"script_id":{"type":"string"},"name":{"type":"string"},"version":{"type":"integer"},"status":{"type":"string","enum":["Draft","Inactive","Deployed"]},"deployment_failure_reason":{"type":"string"},"last_invoked_on":{"type":"string"},"deployed_at":{"type":"string","format":"date-time"},"deployment_failed_at":{"type":"string","format":"date-time"},"deploying":{"type":"boolean"},"content":{"type":"object"},"script":{"$ref":"#/components/schemas/Scripts"},"deployment_failure_detail":{"type":"string"},"is_draft":{"type":"boolean"}}},"Scripts":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier"},"script_template_id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string","items":{"type":"object"}},"language":{"type":"string","items":{"type":"object"},"enum":["c_sharp_8_0","go_1_18","go_1_23","go_1_26","rust_1_82","rust_1_94","node_18","node_20","node_22","node_24","php_8_1","php_8_2","php_8_3","php_8_4","php_8_5","python_3","mcp","ruby_3"]},"created_at":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"script_id":{"type":"integer"},"version":{"type":"string"},"deployed_at":{"type":"string"},"deployment_failed_at":{"type":"string"},"deploying":{"type":"string"},"deployment_failure_reason":{"type":"string"},"content":{"type":"string"},"ai_created":{"type":"boolean"},"value":{"type":"string"},"versions":{"type":"array","items":{"$ref":"#/components/schemas/ScriptVersions"}},"latest_version":{"$ref":"#/components/schemas/ScriptVersions"},"type":{"type":"string","enum":["custom","pre_auth","post_auth","pre_request","post_request","pagination"]},"updated_by":{"type":"string"},"updated_by_user":{"type":"string"},"versions_count":{"type":"integer"},"versions_remaining":{"type":"string"},"max_versions":{"type":"string"},"unlimited_versions":{"type":"boolean"}}},"Certificates":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"connector_id":{"type":"integer"},"certificate":{"type":"string"},"passphrase":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"object"},"user_id":{"type":"object"},"connector":{"$ref":"#/components/schemas/Connectors"},"user":{"type":"object"},"message_broker_id":{"type":"integer"}}},"SystemType":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"label":{"type":"string"},"system_templates":{"type":"array","items":{"$ref":"#/components/schemas/SystemTemplates"}}}},"SystemTemplates":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"label":{"type":"string"},"colour":{"type":"string","enum":["blue","blue_inverted","cyan","cyan_inverted","gray","gray_inverted","green","green_inverted","orange","orange_inverted","pink","pink_inverted","purple","purple_inverted","red","red_inverted","yellow","yellow_inverted"]},"logo_url":{"type":"string"},"version":{"type":"integer"},"version_name":{"type":"string"},"rate_limit_unit":{"type":"string","enum":["second","minute","hour","day"]},"protocol":{"type":"object","enum":["HTTP","FTP","SFTP","FTPS","S3","MySQL","PGSQL","SQLSRV","PUBLIC","OCI"]},"rate_limit_duration":{"type":"integer"},"system_type_id":{"type":"integer"},"system_type":{"$ref":"#/components/schemas/SystemType","enum":["Accounting","CRM","eCommerce","ERP","Marketplaces","Other","PIM","POS","3PL","WMS","Database"]},"date_format":{"type":"string"},"canonical_key":{"type":"object"},"company_id":{"type":"object"},"public_company_id":{"type":"object"},"company":{"type":"object"},"public_company":{"type":"object"},"logo":{"$ref":"#/components/schemas/MediaFiles"},"instances":{"type":"array","items":{"type":"object"}},"authentication_implementation_templates":{"type":"array","items":{"type":"object"}},"marketplace_company_id":{"type":"object"},"marketplace_company":{"type":"object"},"help_link":{"type":"string"}}},"EntityType":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"label":{"type":"string"}}},"EndpointSchema":{"type":"object","properties":{"id":{"type":"integer"},"endpoint_id":{"type":"integer"},"endpoint":{"$ref":"#/components/schemas/Endpoints"},"schema":{"type":"string"}}},"Filters":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"type":{"type":"string","enum":["string","string_length","number","absolute date","relative date","XPath","boolean","null","variable","array","array_length"]},"comparison":{"type":"string","enum":[">","<","==","<=",">=","!=","*","!*","NOT NULL","IS NULL","*[]","!*[]","regex"]},"value":{"type":"string"},"value_type":{"type":"string","enum":["string","integer","float","boolean","date"]},"keep_matching":{"type":"boolean"},"operator_logic":{"type":"string","enum":["and","or"]},"match_order":{"type":"boolean"},"is_default":{"type":"boolean"},"location":{"type":"string","enum":["header","body","url"]},"model_type":{"type":"string"},"model_id":{"type":"integer"},"date_format":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"field":{"type":"string"},"is_active":{"type":"boolean"}}},"DataPool":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"name":{"type":"string"},"description":{"type":"string"},"data_pool_template_id":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"FlowStepRoute":{"type":"object","properties":{"id":{"type":"integer"},"flow_step_id":{"type":"integer"},"name":{"type":"string"},"first_step_id":{"type":"integer"},"filter_logic_operator":{"type":"string","enum":["and","or"]},"filters":{"type":"array","items":{"$ref":"#/components/schemas/Filters"}},"first_step":{"$ref":"#/components/schemas/FlowSteps"},"order":{"type":"string"}}},"Caches":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"scope":{"type":"string","enum":["Flow run","Flow","Company"]},"ttl":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"flow_id":{"type":"integer"},"cache_template_id":{"type":"integer"},"content":{"type":"string"},"ttl_unit":{"type":"string"},"ttl_number":{"type":"string"},"flow":{"type":"object"}}},"PayloadMetadata":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"flow_version_id":{"type":"integer"},"flow_step_id":{"type":"integer"},"flow_run_id":{"type":"string"},"payload_store_reference":{"type":"string"},"payload_size":{"type":"string"},"dropped":{"type":"boolean"}}},"MessageBrokers":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"description":{"type":"string"},"host":{"type":"string","items":{"type":"object"}},"port":{"type":"integer","items":{"type":"object"}},"protocol":{"type":"string","enum":["AMQP-0-9-1","AMQP 1.0","IBM MQ","MQTT","STOMP"],"items":{"type":"object"}},"auth_type":{"type":"string","items":{"type":"object"},"enum":["Basic","x.509 Certificate"]},"variables":{"type":"array","items":{"$ref":"#/components/schemas/Variables"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"flows":{"type":"array","items":{"$ref":"#/components/schemas/Flows"}},"message_broker_queues":{"type":"array","items":{"$ref":"#/components/schemas/MessageBrokerQueues"}},"message_broker_queues_count":{"type":"array","items":{"type":"object"}},"flow_message_broker_queues":{"type":"array","items":{"$ref":"#/components/schemas/FlowMessageBrokerQueue"}},"certificate":{"$ref":"#/components/schemas/Certificates"}}},"MessageBrokerQueues":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier"},"flow_id":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"array","items":{"type":"object"}},"message_broker_id":{"type":"integer"},"flows":{"type":"array","items":{"$ref":"#/components/schemas/Flows"}},"message_broker":{"$ref":"#/components/schemas/MessageBrokers"},"consumer_type":{"type":"string","enum":["queue","topic"]},"subscription_name":{"type":"string"},"flows_count":{"type":"integer"},"user":{"type":"object"}}},"FlowMessageBrokerQueue":{"type":"object","properties":{"id":{"type":"integer"},"flow_id":{"type":"integer"},"message_broker_id":{"type":"integer"},"message_broker_queue_id":{"type":"string"},"last_error":{"type":"string"},"name":{"type":"string"},"message_broker":{"type":"object"},"flow":{"type":"object"}}},"FlowNotificationGroup":{"type":"object","properties":{"flow_id":{"type":"integer"},"notification_group_id":{"type":"integer"}}},"MessageResponse":{"type":"object","properties":{"message":{"type":"string"}}}}},"paths":{"/api/v1/flows/{flow}/versions/{version}":{"get":{"summary":"Get Flow Version","description":"Retrieves the details of a specific flow version.","parameters":[{"name":"flow","in":"path","required":true,"schema":{"type":"string"},"description":"The flow identifier."},{"name":"version","in":"path","required":true,"schema":{"type":"string"},"description":"The version identifier."},{"name":"include","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","enum":["savedByUser","deployedByUser","steps","runs","latestRun","schedules","filters","variables"]}},"style":"form","explode":false,"description":"Comma-separated list of relationships to include. Available: savedByUser, deployedByUser, steps, runs, latestRun, schedules, filters, variables"}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowsResponse"}}}},"401":{"description":"Unauthenticated"},"403":{"description":"Unauthorized"},"404":{"description":"Not Found. The record does not exist.","content":{"application/json":{"schema":{"type":"string"}}}},"429":{"description":"Too Many Requests. The rate limit for this user has been reached.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current minute.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}}},"tags":["Flow Versions"],"operationId":"flowsVersionsShow"}}}}
```

## Update Flow Version

> Updates an existing flow version. Accepts a \`deployed\_at\` timestamp.

```json
{"openapi":"3.0.0","info":{"title":"Patchworks Core API","version":"1.0.0"},"tags":[{"name":"Flow Versions"}],"servers":[{"url":"https://core.wearepatchworks.com"}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"API key passed in the Authorization header. Format: `<api-key>`"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2 Bearer token obtained from POST /fabric/api/login"}},"schemas":{"FlowsResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Flows"}}},"Flows":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"name":{"type":"string"},"enabled_at":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["Draft","Inactive","Deployed"]},"format":{"type":"string","enum":["csv","json","txt","xml"]},"body":{"type":"string"},"deployed_at":{"type":"string"},"labels":{"type":"array","items":{"$ref":"#/components/schemas/Labels"}},"notification_groups":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"description":{"type":"string"},"layout_direction":{"type":"string"},"is_enabled":{"type":"boolean"},"latest_version":{"$ref":"#/components/schemas/FlowVersions"},"current_version":{"$ref":"#/components/schemas/FlowVersions"},"deployed_version":{"$ref":"#/components/schemas/FlowVersions"},"latest_deployed_version":{"$ref":"#/components/schemas/FlowVersions"},"versions":{"type":"array","items":{"$ref":"#/components/schemas/FlowVersions"}},"version_type_counts":{"type":"array","items":{"type":"object"}},"message_brokers":{"type":"array","items":{"$ref":"#/components/schemas/MessageBrokers"}},"message_broker_queues":{"type":"array","items":{"$ref":"#/components/schemas/MessageBrokerQueues"}},"notification_group_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlowNotificationGroup"}},"webhooks":{"type":"array","items":{"type":"object"}},"callbacks":{"type":"array","items":{"type":"object"}},"current_version_step_count":{"type":"integer"},"current_version_connector_count":{"type":"integer"},"current_version_script_count":{"type":"integer"},"current_version_cache_count":{"type":"integer"},"current_version_data_pool_count":{"type":"integer"},"current_version_cross_ref_count":{"type":"integer"},"use_queued_time":{"type":"boolean"},"remove_failed_payloads":{"type":"boolean"},"priority":{"type":"array","items":{"type":"object"}},"prod_flag":{"type":"boolean"},"deployments":{"type":"array","items":{"$ref":"#/components/schemas/FlowVersionDeployment"}},"webhooks_count":{"type":"integer"},"callbacks_count":{"type":"integer"},"marketplace_app_id":{"type":"integer"},"blueprint_id":{"type":"integer"},"blueprint_version_number":{"type":"string"},"flow_folder_id":{"type":"integer"},"flow_message_broker_queues":{"type":"array","items":{"$ref":"#/components/schemas/FlowMessageBrokerQueue"}},"max_concurrency":{"type":"integer"}}},"Labels":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier"},"colour":{"type":"string","enum":["blue","blue_inverted","cyan","cyan_inverted","gray","gray_inverted","green","green_inverted","orange","orange_inverted","pink","pink_inverted","purple","purple_inverted","red","red_inverted","yellow","yellow_inverted"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"}}},"FlowVersions":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"virtual_environment_id":{"type":"string"},"flow_version_id":{"type":"string"},"priority":{"type":"integer"},"cron_string":{"type":"string"},"microservice":{"type":"string"},"config":{"type":"string"},"flow_step_route_id":{"type":"integer"},"variables":{"type":"array","items":{"$ref":"#/components/schemas/FlowVersionVariable"}},"parent_id":{"type":"integer"},"type":{"type":"string"},"key":{"type":"string"},"value":{"type":"string"},"date_format":{"type":"string"},"secret":{"type":"string"},"enabled_at":{"type":"string"},"created_at":{"type":"string","format":"date-time","items":{"type":"object"}},"updated_at":{"type":"string","format":"date-time","items":{"type":"object"}},"flow_id":{"type":"integer"},"flow_name":{"type":"string"},"flow_priority":{"type":"string"},"iteration":{"type":"integer"},"status":{"type":"string","enum":["Draft","Inactive","Deployed"]},"is_deployed":{"type":"boolean"},"is_editable":{"type":"boolean"},"deployed_at":{"type":"string","format":"date-time"},"deployed_by":{"type":"object"},"deployed_by_user":{"type":"object"},"deployments":{"type":"array","items":{"$ref":"#/components/schemas/FlowVersionDeployment"}},"has_callback_step":{"type":"boolean"},"steps":{"type":"array","items":{"$ref":"#/components/schemas/FlowSteps"}},"runs":{"type":"array","items":{"type":"object"}},"latest_run":{"type":"string"},"schedules":{"type":"array","items":{"type":"object"}},"filters":{"type":"array","items":{"type":"object"}},"steps_count":{"type":"array","items":{"type":"object"}},"pivot":{"type":"string"},"saved_at":{"type":"string","format":"date-time"},"saved_by":{"type":"string"},"saved_by_user":{"type":"object"}}},"FlowVersionVariable":{"type":"object","properties":{"id":{"type":"integer"},"type":{"type":"string","enum":["string","number","absolute date","relative date","boolean"]},"value":{"type":"string"},"key":{"type":"string"},"date_format":{"type":"string"},"secret":{"type":"boolean"}}},"FlowVersionDeployment":{"type":"object","properties":{"id":{"type":"integer"},"flow_version_id":{"type":"integer"},"flow_version":{"$ref":"#/components/schemas/FlowVersions"},"virtual_environment_id":{"type":"integer"},"virtual_environment":{"$ref":"#/components/schemas/VirtualEnvironments"},"enabled_by":{"type":"string"},"enabled_by_user":{"type":"object"},"enabled_at":{"type":"string","format":"date-time"},"package_id":{"type":"integer"},"package":{"$ref":"#/components/schemas/Packages"},"user_id":{"type":"integer"},"user":{"type":"object"},"priority":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"VirtualEnvironments":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"notes":{"type":"string"},"deployed_at":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string"},"name":{"type":"string","items":{"type":"object"}},"description":{"type":"string","items":{"type":"object"}},"type":{"type":"string","items":{"type":"object"},"enum":["LIVE","TEST"]},"deployments":{"type":"array","items":{"$ref":"#/components/schemas/FlowVersionDeployment"}},"versions":{"type":"array","items":{"$ref":"#/components/schemas/VirtualEnvironmentVersions"}},"versions_count":{"type":"integer"},"first_version":{"$ref":"#/components/schemas/VirtualEnvironmentVersions"},"deployed_version":{"$ref":"#/components/schemas/VirtualEnvironmentVersions"},"flows":{"type":"string"},"is_deployed":{"type":"boolean"},"deployments_count":{"type":"array","items":{"type":"object"}},"pivot":{"type":"array","items":{"type":"object"}},"package_deployments":{"type":"array","items":{"$ref":"#/components/schemas/PackageVirtualEnvironment"}},"labels":{"type":"array","items":{"$ref":"#/components/schemas/Labels"}}}},"VirtualEnvironmentVersions":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"flow_id":{"type":"string"},"priority":{"type":"integer"},"model_type":{"type":"string"},"original_model_id":{"type":"string"},"replacement_model_id":{"type":"string"},"type":{"type":"string"},"key":{"type":"string"},"value":{"type":"string"},"fallback":{"type":"string"},"date_format":{"type":"string"},"secret":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"version":{"type":"object"},"virtual_environment_id":{"type":"integer"},"virtual_environment":{"$ref":"#/components/schemas/VirtualEnvironments"},"status":{"type":"string","enum":["Draft","Inactive","Deployed"]},"deployed_at":{"type":"string","format":"date-time"},"deployed_by":{"type":"array","items":{"type":"object"}},"notes":{"type":"array","items":{"type":"object"}},"manifests":{"type":"array","items":{"$ref":"#/components/schemas/VirtualEnvironmentVersionManifest"}},"variables":{"type":"array","items":{"$ref":"#/components/schemas/VirtualEnvironmentVersionVariable"}},"counts":{"type":"string"},"user_id":{"type":"object"},"user":{"type":"object"}}},"VirtualEnvironmentVersionManifest":{"type":"object","properties":{"id":{"type":"integer"},"virtual_environment_version_id":{"type":"integer"},"virtual_environment_version":{"$ref":"#/components/schemas/VirtualEnvironmentVersions"},"model_type":{"type":"string"},"original_model_id":{"type":"integer"},"original_model":{},"replacement_model_id":{"type":"integer"},"replacement_model":{},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"VirtualEnvironmentVersionVariable":{"type":"object","properties":{"id":{"type":"integer"},"virtual_environment_version_id":{"type":"integer"},"type":{"type":"string"},"value":{"type":"string"},"fallback":{"type":"string"},"key":{"type":"string"},"date_format":{"type":"string"},"secret":{"type":"boolean"}}},"PackageVirtualEnvironment":{"type":"object","properties":{"user":{"type":"object"},"package":{"$ref":"#/components/schemas/Packages"}}},"Packages":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"name":{"type":"string"},"notes":{"type":"string"},"created_by":{"type":"string","items":{"type":"object"}},"priority":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"created_by_user":{"type":"object"},"flow_versions":{"type":"array","items":{"$ref":"#/components/schemas/FlowVersions"}},"virtual_environments":{"type":"array","items":{"$ref":"#/components/schemas/VirtualEnvironments"}},"deployments":{"type":"array","items":{"$ref":"#/components/schemas/PackageVirtualEnvironment"}},"flow_versions_count":{"type":"integer"},"deployments_count":{"type":"integer"},"flow_version_deployments_count":{"type":"integer"}}},"FlowSteps":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"first_step_id":{"type":"string"},"filter_logic_operator":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"flow_version_id":{"type":"integer"},"name":{"type":"string"},"microservice":{"type":"object","enum":["gateway","trigger","start","connector","pull","push","map","filter","route","script","manual-payload","assert-payload","split","batch","dedupe","cache","cache-set","cache-get","track","variable-set","run-flow","logging","events","notify","try-catch","branch","callback","data-transform","medium-processor","long-processor","scheduler","cross-reference"]},"config":{"type":"object"},"parent_id":{"type":"object"},"flow_version":{"$ref":"#/components/schemas/FlowVersions"},"children":{"type":"object"},"endpoint":{"$ref":"#/components/schemas/Endpoints"},"connector":{"$ref":"#/components/schemas/Connectors"},"data_pool":{"$ref":"#/components/schemas/DataPool"},"filters":{"type":"array","items":{"$ref":"#/components/schemas/Filters"}},"parent_flow_step":{"$ref":"#/components/schemas/FlowSteps"},"routes":{"type":"array","items":{"$ref":"#/components/schemas/FlowStepRoute"}},"variables":{"type":"array","items":{"$ref":"#/components/schemas/Variables"}},"script_version":{"$ref":"#/components/schemas/ScriptVersions"},"cache":{"$ref":"#/components/schemas/Caches"},"payloads":{"type":"array","items":{"$ref":"#/components/schemas/PayloadMetadata"}},"flow":{"$ref":"#/components/schemas/Flows"},"cross_references":{"type":"string"},"notes_count":{"type":"object"},"notification_group":{"type":"object"},"order":{"type":"string"}}},"Endpoints":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"field_path":{"type":"string"},"tags":{"type":"string"},"label":{"type":"string"},"key":{"type":"string"},"value":{"type":"string"},"secret":{"type":"string"},"variables":{"type":"array","items":{"$ref":"#/components/schemas/Variables"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"object"},"system_id":{"type":"integer"},"system":{"$ref":"#/components/schemas/Systems"},"entity_type_id":{"type":"integer"},"entity_type":{"$ref":"#/components/schemas/EntityType"},"endpoint":{"type":"string"},"http_method":{"type":"string","enum":["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"]},"data_type":{"type":"string","enum":["csv","json","txt","xml"]},"pagination_method":{"type":"string","enum":["Custom relative URI","Link Header","Next page token","Next Page URL","Page number parameter","Limit offset","default","PeopleVox","NetSuite SOAP","GraphQL Cursor","Database limit offset","Script"]},"deprecated_at":{"type":"string","format":"date-time"},"direction":{"type":"string","enum":["Send","Receive"]},"returns_multiple_records":{"type":"boolean"},"pre_script_version_id":{"type":"string"},"post_script_version_id":{"type":"string"},"endpoint_schema":{"$ref":"#/components/schemas/EndpointSchema"},"field_tags":{"type":"array","items":{"type":"object"}},"data_path":{"type":"array","items":{"type":"object"}},"body_format":{"type":"array","items":{"type":"object"},"enum":["none","form-data","raw","text"]},"raw_body":{"type":"array","items":{"type":"object"}},"filters":{"type":"array","items":{"$ref":"#/components/schemas/Filters"}},"modified":{"type":"array","items":{"type":"object"}},"help_link":{"type":"array","items":{"type":"object"}},"authentication_implementations":{"type":"array","items":{"$ref":"#/components/schemas/AuthenticationImplementations"}},"pre_script_version":{"$ref":"#/components/schemas/ScriptVersions"},"post_script_version":{"$ref":"#/components/schemas/ScriptVersions"},"disable_header_addition":{"type":"boolean"},"response_encoding":{"type":"string","enum":["base64","none"]}}},"Variables":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier"},"label":{"type":"string"},"key":{"type":"string"},"value":{"type":"string"},"secret":{"type":"boolean"},"locked":{"type":"boolean"},"configurable":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"modified":{"type":"string"},"pivot":{"type":"object"},"required":{"type":"boolean"},"advanced":{"type":"boolean"},"alias":{"type":"string"}}},"Systems":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"name":{"type":"string"},"entity_type_id":{"type":"integer"},"direction":{"type":"string","enum":["Send","Receive"]},"http_method":{"type":"string","enum":["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"]},"label":{"type":"string"},"colour":{"type":"string","enum":["blue","blue_inverted","cyan","cyan_inverted","gray","gray_inverted","green","green_inverted","orange","orange_inverted","pink","pink_inverted","purple","purple_inverted","red","red_inverted","yellow","yellow_inverted"]},"system_template_id":{"type":"integer"},"version":{"type":"integer"},"version_name":{"type":"string"},"system_type_id":{"type":"integer"},"protocol":{"type":"string","enum":["HTTP","FTP","SFTP","FTPS","S3","MySQL","PGSQL","SQLSRV","PUBLIC","OCI"]},"date_format":{"type":"string"},"help_link":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"rate_limit_unit":{"type":"string","enum":["second","minute","hour","day"]},"rate_limit_duration":{"type":"integer"},"endpoint":{"type":"string"},"method":{"type":"string"},"data_type":{"type":"string","enum":["csv","json","txt","xml"]},"body_format":{"type":"string","enum":["none","form-data","raw","text"]},"additional_endpoint_1":{"type":"string"},"additional_endpoint_2":{"type":"string"},"timeout":{"type":"integer"},"authentication_type_id":{"type":"string"},"returns_multiple_records":{"type":"string"},"pagination_method":{"type":"string","enum":["Custom relative URI","Link Header","Next page token","Next Page URL","Page number parameter","Limit offset","default","PeopleVox","NetSuite SOAP","GraphQL Cursor","Database limit offset","Script"]},"schema":{"type":"string"},"endpoint_template_id":{"type":"integer"},"data_path":{"type":"string"},"raw_body":{"type":"string"},"deprecated_at":{"type":"string"},"disable_header_addition":{"type":"string"},"response_encoding":{"type":"string","enum":["base64","none"]},"key":{"type":"string"},"value":{"type":"string"},"secret":{"type":"string"},"logo":{"$ref":"#/components/schemas/MediaFiles"},"pre_script_version_id":{"type":"string"},"post_script_version_id":{"type":"string"},"canonical_key":{"type":"array","items":{"type":"object"}},"connectors":{"type":"array","items":{"$ref":"#/components/schemas/Connectors"}},"system_type":{"$ref":"#/components/schemas/SystemType","enum":["Accounting","CRM","eCommerce","ERP","Marketplaces","Other","PIM","POS","3PL","WMS","Database"]},"system_template":{"$ref":"#/components/schemas/SystemTemplates"},"authentication_implementations":{"type":"array","items":{"$ref":"#/components/schemas/AuthenticationImplementations"}},"authentication_implementations_count":{"type":"array","items":{"type":"object"}},"endpoints":{"type":"array","items":{"$ref":"#/components/schemas/Endpoints"}},"variables":{"type":"array","items":{"$ref":"#/components/schemas/Variables"}},"updatable":{"type":"string"},"modified":{"type":"string"},"is_deployed":{"type":"boolean"}}},"MediaFiles":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"model_type":{"type":"string"},"model_id":{"type":"integer"},"file_name":{"type":"string"},"mime_type":{"type":"string"},"expires_at":{"type":"string","format":"date-time"},"is_expired":{"type":"boolean"}}},"Connectors":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"authentication_implementation_id":{"type":"integer"},"timezone":{"type":"string"},"date_format":{"type":"string"},"rate_limit_unit":{"type":"string","enum":["second","minute","hour","day"]},"rate_limit_duration":{"type":"integer"},"connection_pool_id":{"type":"integer"},"variables":{"type":"array","items":{"$ref":"#/components/schemas/Variables"}},"session_id":{"type":"string"},"platform_app_key":{"type":"string"},"certificate_id":{"type":"string"},"type":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"authentication_implementation":{"$ref":"#/components/schemas/AuthenticationImplementations"},"system":{"$ref":"#/components/schemas/Systems"},"certificate":{"$ref":"#/components/schemas/Certificates"}}},"AuthenticationImplementations":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"endpoint_ids":{"type":"string"},"label":{"type":"string"},"key":{"type":"string"},"value":{"type":"string"},"secret":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"endpoint":{"type":"string"},"method":{"type":"string"},"additional_endpoint_1":{"type":"string"},"additional_endpoint_2":{"type":"string"},"authentication_type_id":{"type":"integer"},"authentication_implementation_template_id":{"type":"integer"},"authentication_type":{"$ref":"#/components/schemas/AuthenticationType"},"system_id":{"type":"integer"},"body_format":{"type":"string","enum":["none","form-data","raw","text"]},"data_type":{"type":"string","enum":["csv","json","txt","xml"]},"pre_script_version_id":{"type":"string"},"post_script_version_id":{"type":"string"},"timeout":{"type":"integer"},"system":{"$ref":"#/components/schemas/Systems"},"variables":{"type":"array","items":{"$ref":"#/components/schemas/Variables"}},"endpoints":{"type":"array","items":{"$ref":"#/components/schemas/Endpoints"}},"pre_script_version":{"$ref":"#/components/schemas/ScriptVersions"},"post_script_version":{"$ref":"#/components/schemas/ScriptVersions"},"modified":{"type":"string"},"help_link":{"type":"string"},"disable_token_url_parameters":{"type":"boolean"}}},"AuthenticationType":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"label":{"type":"string"},"is_enabled":{"type":"boolean"},"hidden":{"type":"boolean"},"protocol":{"type":"string","enum":["HTTP","FTP","SFTP","FTPS","S3","MySQL","PGSQL","SQLSRV","PUBLIC","OCI"]}}},"ScriptVersions":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"script_id":{"type":"string"},"name":{"type":"string"},"version":{"type":"integer"},"status":{"type":"string","enum":["Draft","Inactive","Deployed"]},"deployment_failure_reason":{"type":"string"},"last_invoked_on":{"type":"string"},"deployed_at":{"type":"string","format":"date-time"},"deployment_failed_at":{"type":"string","format":"date-time"},"deploying":{"type":"boolean"},"content":{"type":"object"},"script":{"$ref":"#/components/schemas/Scripts"},"deployment_failure_detail":{"type":"string"},"is_draft":{"type":"boolean"}}},"Scripts":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier"},"script_template_id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string","items":{"type":"object"}},"language":{"type":"string","items":{"type":"object"},"enum":["c_sharp_8_0","go_1_18","go_1_23","go_1_26","rust_1_82","rust_1_94","node_18","node_20","node_22","node_24","php_8_1","php_8_2","php_8_3","php_8_4","php_8_5","python_3","mcp","ruby_3"]},"created_at":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"script_id":{"type":"integer"},"version":{"type":"string"},"deployed_at":{"type":"string"},"deployment_failed_at":{"type":"string"},"deploying":{"type":"string"},"deployment_failure_reason":{"type":"string"},"content":{"type":"string"},"ai_created":{"type":"boolean"},"value":{"type":"string"},"versions":{"type":"array","items":{"$ref":"#/components/schemas/ScriptVersions"}},"latest_version":{"$ref":"#/components/schemas/ScriptVersions"},"type":{"type":"string","enum":["custom","pre_auth","post_auth","pre_request","post_request","pagination"]},"updated_by":{"type":"string"},"updated_by_user":{"type":"string"},"versions_count":{"type":"integer"},"versions_remaining":{"type":"string"},"max_versions":{"type":"string"},"unlimited_versions":{"type":"boolean"}}},"Certificates":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"connector_id":{"type":"integer"},"certificate":{"type":"string"},"passphrase":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"object"},"user_id":{"type":"object"},"connector":{"$ref":"#/components/schemas/Connectors"},"user":{"type":"object"},"message_broker_id":{"type":"integer"}}},"SystemType":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"label":{"type":"string"},"system_templates":{"type":"array","items":{"$ref":"#/components/schemas/SystemTemplates"}}}},"SystemTemplates":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"label":{"type":"string"},"colour":{"type":"string","enum":["blue","blue_inverted","cyan","cyan_inverted","gray","gray_inverted","green","green_inverted","orange","orange_inverted","pink","pink_inverted","purple","purple_inverted","red","red_inverted","yellow","yellow_inverted"]},"logo_url":{"type":"string"},"version":{"type":"integer"},"version_name":{"type":"string"},"rate_limit_unit":{"type":"string","enum":["second","minute","hour","day"]},"protocol":{"type":"object","enum":["HTTP","FTP","SFTP","FTPS","S3","MySQL","PGSQL","SQLSRV","PUBLIC","OCI"]},"rate_limit_duration":{"type":"integer"},"system_type_id":{"type":"integer"},"system_type":{"$ref":"#/components/schemas/SystemType","enum":["Accounting","CRM","eCommerce","ERP","Marketplaces","Other","PIM","POS","3PL","WMS","Database"]},"date_format":{"type":"string"},"canonical_key":{"type":"object"},"company_id":{"type":"object"},"public_company_id":{"type":"object"},"company":{"type":"object"},"public_company":{"type":"object"},"logo":{"$ref":"#/components/schemas/MediaFiles"},"instances":{"type":"array","items":{"type":"object"}},"authentication_implementation_templates":{"type":"array","items":{"type":"object"}},"marketplace_company_id":{"type":"object"},"marketplace_company":{"type":"object"},"help_link":{"type":"string"}}},"EntityType":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"label":{"type":"string"}}},"EndpointSchema":{"type":"object","properties":{"id":{"type":"integer"},"endpoint_id":{"type":"integer"},"endpoint":{"$ref":"#/components/schemas/Endpoints"},"schema":{"type":"string"}}},"Filters":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"type":{"type":"string","enum":["string","string_length","number","absolute date","relative date","XPath","boolean","null","variable","array","array_length"]},"comparison":{"type":"string","enum":[">","<","==","<=",">=","!=","*","!*","NOT NULL","IS NULL","*[]","!*[]","regex"]},"value":{"type":"string"},"value_type":{"type":"string","enum":["string","integer","float","boolean","date"]},"keep_matching":{"type":"boolean"},"operator_logic":{"type":"string","enum":["and","or"]},"match_order":{"type":"boolean"},"is_default":{"type":"boolean"},"location":{"type":"string","enum":["header","body","url"]},"model_type":{"type":"string"},"model_id":{"type":"integer"},"date_format":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"field":{"type":"string"},"is_active":{"type":"boolean"}}},"DataPool":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"name":{"type":"string"},"description":{"type":"string"},"data_pool_template_id":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"FlowStepRoute":{"type":"object","properties":{"id":{"type":"integer"},"flow_step_id":{"type":"integer"},"name":{"type":"string"},"first_step_id":{"type":"integer"},"filter_logic_operator":{"type":"string","enum":["and","or"]},"filters":{"type":"array","items":{"$ref":"#/components/schemas/Filters"}},"first_step":{"$ref":"#/components/schemas/FlowSteps"},"order":{"type":"string"}}},"Caches":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"scope":{"type":"string","enum":["Flow run","Flow","Company"]},"ttl":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"flow_id":{"type":"integer"},"cache_template_id":{"type":"integer"},"content":{"type":"string"},"ttl_unit":{"type":"string"},"ttl_number":{"type":"string"},"flow":{"type":"object"}}},"PayloadMetadata":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"flow_version_id":{"type":"integer"},"flow_step_id":{"type":"integer"},"flow_run_id":{"type":"string"},"payload_store_reference":{"type":"string"},"payload_size":{"type":"string"},"dropped":{"type":"boolean"}}},"MessageBrokers":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"description":{"type":"string"},"host":{"type":"string","items":{"type":"object"}},"port":{"type":"integer","items":{"type":"object"}},"protocol":{"type":"string","enum":["AMQP-0-9-1","AMQP 1.0","IBM MQ","MQTT","STOMP"],"items":{"type":"object"}},"auth_type":{"type":"string","items":{"type":"object"},"enum":["Basic","x.509 Certificate"]},"variables":{"type":"array","items":{"$ref":"#/components/schemas/Variables"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"flows":{"type":"array","items":{"$ref":"#/components/schemas/Flows"}},"message_broker_queues":{"type":"array","items":{"$ref":"#/components/schemas/MessageBrokerQueues"}},"message_broker_queues_count":{"type":"array","items":{"type":"object"}},"flow_message_broker_queues":{"type":"array","items":{"$ref":"#/components/schemas/FlowMessageBrokerQueue"}},"certificate":{"$ref":"#/components/schemas/Certificates"}}},"MessageBrokerQueues":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier"},"flow_id":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"array","items":{"type":"object"}},"message_broker_id":{"type":"integer"},"flows":{"type":"array","items":{"$ref":"#/components/schemas/Flows"}},"message_broker":{"$ref":"#/components/schemas/MessageBrokers"},"consumer_type":{"type":"string","enum":["queue","topic"]},"subscription_name":{"type":"string"},"flows_count":{"type":"integer"},"user":{"type":"object"}}},"FlowMessageBrokerQueue":{"type":"object","properties":{"id":{"type":"integer"},"flow_id":{"type":"integer"},"message_broker_id":{"type":"integer"},"message_broker_queue_id":{"type":"string"},"last_error":{"type":"string"},"name":{"type":"string"},"message_broker":{"type":"object"},"flow":{"type":"object"}}},"FlowNotificationGroup":{"type":"object","properties":{"flow_id":{"type":"integer"},"notification_group_id":{"type":"integer"}}},"ErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}},"MessageResponse":{"type":"object","properties":{"message":{"type":"string"}}},"FlowsUpdateVersionsRequest":{"type":"object","properties":{"deployed_at":{"type":"string","format":"date-time","nullable":true}}}}},"paths":{"/api/v1/flows/{flow}/versions/{version}":{"put":{"summary":"Update Flow Version","description":"Updates an existing flow version. Accepts a `deployed_at` timestamp.","parameters":[{"name":"flow","in":"path","required":true,"schema":{"type":"string"},"description":"The flow identifier."},{"name":"version","in":"path","required":true,"schema":{"type":"string"},"description":"The version identifier."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowsResponse"}}}},"401":{"description":"Unauthenticated"},"403":{"description":"Unauthorized"},"404":{"description":"Not Found. The record does not exist.","content":{"application/json":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests. The rate limit for this user has been reached.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current minute.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowsUpdateVersionsRequest"}}}},"tags":["Flow Versions"],"operationId":"flowsVersionsUpdate"}}}}
```

## Delete Flow Version

> Permanently deletes a specific flow version.

```json
{"openapi":"3.0.0","info":{"title":"Patchworks Core API","version":"1.0.0"},"tags":[{"name":"Flow Versions"}],"servers":[{"url":"https://core.wearepatchworks.com"}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"API key passed in the Authorization header. Format: `<api-key>`"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2 Bearer token obtained from POST /fabric/api/login"}},"schemas":{"MessageResponse":{"type":"object","properties":{"message":{"type":"string"}}}}},"paths":{"/api/v1/flows/{flow}/versions/{version}":{"delete":{"summary":"Delete Flow Version","description":"Permanently deletes a specific flow version.","parameters":[{"name":"flow","in":"path","required":true,"schema":{"type":"string"},"description":"The flow identifier."},{"name":"version","in":"path","required":true,"schema":{"type":"string"},"description":"The version identifier."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"401":{"description":"Unauthenticated"},"403":{"description":"Unauthorized"},"404":{"description":"Not Found. The record does not exist.","content":{"application/json":{"schema":{"type":"string"}}}},"429":{"description":"Too Many Requests. The rate limit for this user has been reached.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current minute.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}}},"tags":["Flow Versions"],"operationId":"flowsVersionsDestroy"}}}}
```

## Copy Flow Version

> Copies an existing deployed flow version into a new draft version. Any existing draft for that flow is overwritten.

```json
{"openapi":"3.0.0","info":{"title":"Patchworks Core API","version":"1.0.0"},"tags":[{"name":"Flow Versions"}],"servers":[{"url":"https://core.wearepatchworks.com"}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"API key passed in the Authorization header. Format: `<api-key>`"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2 Bearer token obtained from POST /fabric/api/login"}},"schemas":{"ErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}},"MessageResponse":{"type":"object","properties":{"message":{"type":"string"}}}}},"paths":{"/api/v1/flows/{flow}/versions/{version}/copy":{"post":{"summary":"Copy Flow Version","description":"Copies an existing deployed flow version into a new draft version. Any existing draft for that flow is overwritten.","parameters":[{"name":"flow","in":"path","required":true,"schema":{"type":"string"},"description":"The flow identifier."},{"name":"version","in":"path","required":true,"schema":{"type":"string"},"description":"The version identifier."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Unauthenticated"},"403":{"description":"Unauthorized"},"404":{"description":"Not Found. The record does not exist.","content":{"application/json":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests. The rate limit for this user has been reached.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current minute.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}}},"tags":["Flow Versions"],"operationId":"flowsVersionsCopy"}}}}
```

## Upload Flow Version

> Uploads a given flow version to your \`private\` marketplace.\
> \
> This operation requires \`administrator\` permissions. If you are authorising requests with an API key, this request won't work (company-level API keys are associated with manager-level permissions). If you are an \`administrator\`, you can use OAuth 2 credentials to complete this operation. For more information please see our \[Authentication]\(<https://doc.wearepatchworks.com/product-documentation/api-reference/getting-started/authentication#oauth-2-client-credentials>) section.

```json
{"openapi":"3.0.0","info":{"title":"Patchworks Core API","version":"1.0.0"},"tags":[{"name":"Flow Versions"}],"servers":[{"url":"https://core.wearepatchworks.com"}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"API key passed in the Authorization header. Format: `<api-key>`"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2 Bearer token obtained from POST /fabric/api/login"}},"schemas":{"ErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}},"MessageResponse":{"type":"object","properties":{"message":{"type":"string"}}},"FlowVersionsUploadUploadRequest":{"type":"object","properties":{"private":{"type":"string"}}}}},"paths":{"/api/v1/flow-versions/{flow_version}/upload":{"post":{"summary":"Upload Flow Version","description":"Uploads a given flow version to your `private` marketplace.\n\nThis operation requires `administrator` permissions. If you are authorising requests with an API key, this request won't work (company-level API keys are associated with manager-level permissions). If you are an `administrator`, you can use OAuth 2 credentials to complete this operation. For more information please see our [Authentication](https://doc.wearepatchworks.com/product-documentation/api-reference/getting-started/authentication#oauth-2-client-credentials) section.","parameters":[{"name":"flow_version","in":"path","required":true,"schema":{"type":"string"},"description":"The flow version identifier."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Unauthenticated"},"403":{"description":"Unauthorized"},"404":{"description":"Not Found. The record does not exist.","content":{"application/json":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests. The rate limit for this user has been reached.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current minute.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowVersionsUploadUploadRequest"}}}},"tags":["Flow Versions"],"operationId":"flowVersionsUpload"}}}}
```

## List Flow Version Metrics

> Retrieves paginated metrics for a flow's versions. Results can be filtered by time interval, metric type, and key.

```json
{"openapi":"3.0.0","info":{"title":"Patchworks Core API","version":"1.0.0"},"tags":[{"name":"Flow Versions"}],"servers":[{"url":"https://core.wearepatchworks.com"}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"API key passed in the Authorization header. Format: `<api-key>`"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2 Bearer token obtained from POST /fabric/api/login"}},"schemas":{"FlowsListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Flows"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"},"links":{"$ref":"#/components/schemas/PaginationLinks"}}},"Flows":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"name":{"type":"string"},"enabled_at":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["Draft","Inactive","Deployed"]},"format":{"type":"string","enum":["csv","json","txt","xml"]},"body":{"type":"string"},"deployed_at":{"type":"string"},"labels":{"type":"array","items":{"$ref":"#/components/schemas/Labels"}},"notification_groups":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"description":{"type":"string"},"layout_direction":{"type":"string"},"is_enabled":{"type":"boolean"},"latest_version":{"$ref":"#/components/schemas/FlowVersions"},"current_version":{"$ref":"#/components/schemas/FlowVersions"},"deployed_version":{"$ref":"#/components/schemas/FlowVersions"},"latest_deployed_version":{"$ref":"#/components/schemas/FlowVersions"},"versions":{"type":"array","items":{"$ref":"#/components/schemas/FlowVersions"}},"version_type_counts":{"type":"array","items":{"type":"object"}},"message_brokers":{"type":"array","items":{"$ref":"#/components/schemas/MessageBrokers"}},"message_broker_queues":{"type":"array","items":{"$ref":"#/components/schemas/MessageBrokerQueues"}},"notification_group_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlowNotificationGroup"}},"webhooks":{"type":"array","items":{"type":"object"}},"callbacks":{"type":"array","items":{"type":"object"}},"current_version_step_count":{"type":"integer"},"current_version_connector_count":{"type":"integer"},"current_version_script_count":{"type":"integer"},"current_version_cache_count":{"type":"integer"},"current_version_data_pool_count":{"type":"integer"},"current_version_cross_ref_count":{"type":"integer"},"use_queued_time":{"type":"boolean"},"remove_failed_payloads":{"type":"boolean"},"priority":{"type":"array","items":{"type":"object"}},"prod_flag":{"type":"boolean"},"deployments":{"type":"array","items":{"$ref":"#/components/schemas/FlowVersionDeployment"}},"webhooks_count":{"type":"integer"},"callbacks_count":{"type":"integer"},"marketplace_app_id":{"type":"integer"},"blueprint_id":{"type":"integer"},"blueprint_version_number":{"type":"string"},"flow_folder_id":{"type":"integer"},"flow_message_broker_queues":{"type":"array","items":{"$ref":"#/components/schemas/FlowMessageBrokerQueue"}},"max_concurrency":{"type":"integer"}}},"Labels":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier"},"colour":{"type":"string","enum":["blue","blue_inverted","cyan","cyan_inverted","gray","gray_inverted","green","green_inverted","orange","orange_inverted","pink","pink_inverted","purple","purple_inverted","red","red_inverted","yellow","yellow_inverted"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"}}},"FlowVersions":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"virtual_environment_id":{"type":"string"},"flow_version_id":{"type":"string"},"priority":{"type":"integer"},"cron_string":{"type":"string"},"microservice":{"type":"string"},"config":{"type":"string"},"flow_step_route_id":{"type":"integer"},"variables":{"type":"array","items":{"$ref":"#/components/schemas/FlowVersionVariable"}},"parent_id":{"type":"integer"},"type":{"type":"string"},"key":{"type":"string"},"value":{"type":"string"},"date_format":{"type":"string"},"secret":{"type":"string"},"enabled_at":{"type":"string"},"created_at":{"type":"string","format":"date-time","items":{"type":"object"}},"updated_at":{"type":"string","format":"date-time","items":{"type":"object"}},"flow_id":{"type":"integer"},"flow_name":{"type":"string"},"flow_priority":{"type":"string"},"iteration":{"type":"integer"},"status":{"type":"string","enum":["Draft","Inactive","Deployed"]},"is_deployed":{"type":"boolean"},"is_editable":{"type":"boolean"},"deployed_at":{"type":"string","format":"date-time"},"deployed_by":{"type":"object"},"deployed_by_user":{"type":"object"},"deployments":{"type":"array","items":{"$ref":"#/components/schemas/FlowVersionDeployment"}},"has_callback_step":{"type":"boolean"},"steps":{"type":"array","items":{"$ref":"#/components/schemas/FlowSteps"}},"runs":{"type":"array","items":{"type":"object"}},"latest_run":{"type":"string"},"schedules":{"type":"array","items":{"type":"object"}},"filters":{"type":"array","items":{"type":"object"}},"steps_count":{"type":"array","items":{"type":"object"}},"pivot":{"type":"string"},"saved_at":{"type":"string","format":"date-time"},"saved_by":{"type":"string"},"saved_by_user":{"type":"object"}}},"FlowVersionVariable":{"type":"object","properties":{"id":{"type":"integer"},"type":{"type":"string","enum":["string","number","absolute date","relative date","boolean"]},"value":{"type":"string"},"key":{"type":"string"},"date_format":{"type":"string"},"secret":{"type":"boolean"}}},"FlowVersionDeployment":{"type":"object","properties":{"id":{"type":"integer"},"flow_version_id":{"type":"integer"},"flow_version":{"$ref":"#/components/schemas/FlowVersions"},"virtual_environment_id":{"type":"integer"},"virtual_environment":{"$ref":"#/components/schemas/VirtualEnvironments"},"enabled_by":{"type":"string"},"enabled_by_user":{"type":"object"},"enabled_at":{"type":"string","format":"date-time"},"package_id":{"type":"integer"},"package":{"$ref":"#/components/schemas/Packages"},"user_id":{"type":"integer"},"user":{"type":"object"},"priority":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"VirtualEnvironments":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"notes":{"type":"string"},"deployed_at":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string"},"name":{"type":"string","items":{"type":"object"}},"description":{"type":"string","items":{"type":"object"}},"type":{"type":"string","items":{"type":"object"},"enum":["LIVE","TEST"]},"deployments":{"type":"array","items":{"$ref":"#/components/schemas/FlowVersionDeployment"}},"versions":{"type":"array","items":{"$ref":"#/components/schemas/VirtualEnvironmentVersions"}},"versions_count":{"type":"integer"},"first_version":{"$ref":"#/components/schemas/VirtualEnvironmentVersions"},"deployed_version":{"$ref":"#/components/schemas/VirtualEnvironmentVersions"},"flows":{"type":"string"},"is_deployed":{"type":"boolean"},"deployments_count":{"type":"array","items":{"type":"object"}},"pivot":{"type":"array","items":{"type":"object"}},"package_deployments":{"type":"array","items":{"$ref":"#/components/schemas/PackageVirtualEnvironment"}},"labels":{"type":"array","items":{"$ref":"#/components/schemas/Labels"}}}},"VirtualEnvironmentVersions":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"flow_id":{"type":"string"},"priority":{"type":"integer"},"model_type":{"type":"string"},"original_model_id":{"type":"string"},"replacement_model_id":{"type":"string"},"type":{"type":"string"},"key":{"type":"string"},"value":{"type":"string"},"fallback":{"type":"string"},"date_format":{"type":"string"},"secret":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"version":{"type":"object"},"virtual_environment_id":{"type":"integer"},"virtual_environment":{"$ref":"#/components/schemas/VirtualEnvironments"},"status":{"type":"string","enum":["Draft","Inactive","Deployed"]},"deployed_at":{"type":"string","format":"date-time"},"deployed_by":{"type":"array","items":{"type":"object"}},"notes":{"type":"array","items":{"type":"object"}},"manifests":{"type":"array","items":{"$ref":"#/components/schemas/VirtualEnvironmentVersionManifest"}},"variables":{"type":"array","items":{"$ref":"#/components/schemas/VirtualEnvironmentVersionVariable"}},"counts":{"type":"string"},"user_id":{"type":"object"},"user":{"type":"object"}}},"VirtualEnvironmentVersionManifest":{"type":"object","properties":{"id":{"type":"integer"},"virtual_environment_version_id":{"type":"integer"},"virtual_environment_version":{"$ref":"#/components/schemas/VirtualEnvironmentVersions"},"model_type":{"type":"string"},"original_model_id":{"type":"integer"},"original_model":{},"replacement_model_id":{"type":"integer"},"replacement_model":{},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"VirtualEnvironmentVersionVariable":{"type":"object","properties":{"id":{"type":"integer"},"virtual_environment_version_id":{"type":"integer"},"type":{"type":"string"},"value":{"type":"string"},"fallback":{"type":"string"},"key":{"type":"string"},"date_format":{"type":"string"},"secret":{"type":"boolean"}}},"PackageVirtualEnvironment":{"type":"object","properties":{"user":{"type":"object"},"package":{"$ref":"#/components/schemas/Packages"}}},"Packages":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"name":{"type":"string"},"notes":{"type":"string"},"created_by":{"type":"string","items":{"type":"object"}},"priority":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"created_by_user":{"type":"object"},"flow_versions":{"type":"array","items":{"$ref":"#/components/schemas/FlowVersions"}},"virtual_environments":{"type":"array","items":{"$ref":"#/components/schemas/VirtualEnvironments"}},"deployments":{"type":"array","items":{"$ref":"#/components/schemas/PackageVirtualEnvironment"}},"flow_versions_count":{"type":"integer"},"deployments_count":{"type":"integer"},"flow_version_deployments_count":{"type":"integer"}}},"FlowSteps":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"first_step_id":{"type":"string"},"filter_logic_operator":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"flow_version_id":{"type":"integer"},"name":{"type":"string"},"microservice":{"type":"object","enum":["gateway","trigger","start","connector","pull","push","map","filter","route","script","manual-payload","assert-payload","split","batch","dedupe","cache","cache-set","cache-get","track","variable-set","run-flow","logging","events","notify","try-catch","branch","callback","data-transform","medium-processor","long-processor","scheduler","cross-reference"]},"config":{"type":"object"},"parent_id":{"type":"object"},"flow_version":{"$ref":"#/components/schemas/FlowVersions"},"children":{"type":"object"},"endpoint":{"$ref":"#/components/schemas/Endpoints"},"connector":{"$ref":"#/components/schemas/Connectors"},"data_pool":{"$ref":"#/components/schemas/DataPool"},"filters":{"type":"array","items":{"$ref":"#/components/schemas/Filters"}},"parent_flow_step":{"$ref":"#/components/schemas/FlowSteps"},"routes":{"type":"array","items":{"$ref":"#/components/schemas/FlowStepRoute"}},"variables":{"type":"array","items":{"$ref":"#/components/schemas/Variables"}},"script_version":{"$ref":"#/components/schemas/ScriptVersions"},"cache":{"$ref":"#/components/schemas/Caches"},"payloads":{"type":"array","items":{"$ref":"#/components/schemas/PayloadMetadata"}},"flow":{"$ref":"#/components/schemas/Flows"},"cross_references":{"type":"string"},"notes_count":{"type":"object"},"notification_group":{"type":"object"},"order":{"type":"string"}}},"Endpoints":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"field_path":{"type":"string"},"tags":{"type":"string"},"label":{"type":"string"},"key":{"type":"string"},"value":{"type":"string"},"secret":{"type":"string"},"variables":{"type":"array","items":{"$ref":"#/components/schemas/Variables"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"object"},"system_id":{"type":"integer"},"system":{"$ref":"#/components/schemas/Systems"},"entity_type_id":{"type":"integer"},"entity_type":{"$ref":"#/components/schemas/EntityType"},"endpoint":{"type":"string"},"http_method":{"type":"string","enum":["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"]},"data_type":{"type":"string","enum":["csv","json","txt","xml"]},"pagination_method":{"type":"string","enum":["Custom relative URI","Link Header","Next page token","Next Page URL","Page number parameter","Limit offset","default","PeopleVox","NetSuite SOAP","GraphQL Cursor","Database limit offset","Script"]},"deprecated_at":{"type":"string","format":"date-time"},"direction":{"type":"string","enum":["Send","Receive"]},"returns_multiple_records":{"type":"boolean"},"pre_script_version_id":{"type":"string"},"post_script_version_id":{"type":"string"},"endpoint_schema":{"$ref":"#/components/schemas/EndpointSchema"},"field_tags":{"type":"array","items":{"type":"object"}},"data_path":{"type":"array","items":{"type":"object"}},"body_format":{"type":"array","items":{"type":"object"},"enum":["none","form-data","raw","text"]},"raw_body":{"type":"array","items":{"type":"object"}},"filters":{"type":"array","items":{"$ref":"#/components/schemas/Filters"}},"modified":{"type":"array","items":{"type":"object"}},"help_link":{"type":"array","items":{"type":"object"}},"authentication_implementations":{"type":"array","items":{"$ref":"#/components/schemas/AuthenticationImplementations"}},"pre_script_version":{"$ref":"#/components/schemas/ScriptVersions"},"post_script_version":{"$ref":"#/components/schemas/ScriptVersions"},"disable_header_addition":{"type":"boolean"},"response_encoding":{"type":"string","enum":["base64","none"]}}},"Variables":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier"},"label":{"type":"string"},"key":{"type":"string"},"value":{"type":"string"},"secret":{"type":"boolean"},"locked":{"type":"boolean"},"configurable":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"modified":{"type":"string"},"pivot":{"type":"object"},"required":{"type":"boolean"},"advanced":{"type":"boolean"},"alias":{"type":"string"}}},"Systems":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"name":{"type":"string"},"entity_type_id":{"type":"integer"},"direction":{"type":"string","enum":["Send","Receive"]},"http_method":{"type":"string","enum":["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"]},"label":{"type":"string"},"colour":{"type":"string","enum":["blue","blue_inverted","cyan","cyan_inverted","gray","gray_inverted","green","green_inverted","orange","orange_inverted","pink","pink_inverted","purple","purple_inverted","red","red_inverted","yellow","yellow_inverted"]},"system_template_id":{"type":"integer"},"version":{"type":"integer"},"version_name":{"type":"string"},"system_type_id":{"type":"integer"},"protocol":{"type":"string","enum":["HTTP","FTP","SFTP","FTPS","S3","MySQL","PGSQL","SQLSRV","PUBLIC","OCI"]},"date_format":{"type":"string"},"help_link":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"rate_limit_unit":{"type":"string","enum":["second","minute","hour","day"]},"rate_limit_duration":{"type":"integer"},"endpoint":{"type":"string"},"method":{"type":"string"},"data_type":{"type":"string","enum":["csv","json","txt","xml"]},"body_format":{"type":"string","enum":["none","form-data","raw","text"]},"additional_endpoint_1":{"type":"string"},"additional_endpoint_2":{"type":"string"},"timeout":{"type":"integer"},"authentication_type_id":{"type":"string"},"returns_multiple_records":{"type":"string"},"pagination_method":{"type":"string","enum":["Custom relative URI","Link Header","Next page token","Next Page URL","Page number parameter","Limit offset","default","PeopleVox","NetSuite SOAP","GraphQL Cursor","Database limit offset","Script"]},"schema":{"type":"string"},"endpoint_template_id":{"type":"integer"},"data_path":{"type":"string"},"raw_body":{"type":"string"},"deprecated_at":{"type":"string"},"disable_header_addition":{"type":"string"},"response_encoding":{"type":"string","enum":["base64","none"]},"key":{"type":"string"},"value":{"type":"string"},"secret":{"type":"string"},"logo":{"$ref":"#/components/schemas/MediaFiles"},"pre_script_version_id":{"type":"string"},"post_script_version_id":{"type":"string"},"canonical_key":{"type":"array","items":{"type":"object"}},"connectors":{"type":"array","items":{"$ref":"#/components/schemas/Connectors"}},"system_type":{"$ref":"#/components/schemas/SystemType","enum":["Accounting","CRM","eCommerce","ERP","Marketplaces","Other","PIM","POS","3PL","WMS","Database"]},"system_template":{"$ref":"#/components/schemas/SystemTemplates"},"authentication_implementations":{"type":"array","items":{"$ref":"#/components/schemas/AuthenticationImplementations"}},"authentication_implementations_count":{"type":"array","items":{"type":"object"}},"endpoints":{"type":"array","items":{"$ref":"#/components/schemas/Endpoints"}},"variables":{"type":"array","items":{"$ref":"#/components/schemas/Variables"}},"updatable":{"type":"string"},"modified":{"type":"string"},"is_deployed":{"type":"boolean"}}},"MediaFiles":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"model_type":{"type":"string"},"model_id":{"type":"integer"},"file_name":{"type":"string"},"mime_type":{"type":"string"},"expires_at":{"type":"string","format":"date-time"},"is_expired":{"type":"boolean"}}},"Connectors":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"authentication_implementation_id":{"type":"integer"},"timezone":{"type":"string"},"date_format":{"type":"string"},"rate_limit_unit":{"type":"string","enum":["second","minute","hour","day"]},"rate_limit_duration":{"type":"integer"},"connection_pool_id":{"type":"integer"},"variables":{"type":"array","items":{"$ref":"#/components/schemas/Variables"}},"session_id":{"type":"string"},"platform_app_key":{"type":"string"},"certificate_id":{"type":"string"},"type":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"authentication_implementation":{"$ref":"#/components/schemas/AuthenticationImplementations"},"system":{"$ref":"#/components/schemas/Systems"},"certificate":{"$ref":"#/components/schemas/Certificates"}}},"AuthenticationImplementations":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"endpoint_ids":{"type":"string"},"label":{"type":"string"},"key":{"type":"string"},"value":{"type":"string"},"secret":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"endpoint":{"type":"string"},"method":{"type":"string"},"additional_endpoint_1":{"type":"string"},"additional_endpoint_2":{"type":"string"},"authentication_type_id":{"type":"integer"},"authentication_implementation_template_id":{"type":"integer"},"authentication_type":{"$ref":"#/components/schemas/AuthenticationType"},"system_id":{"type":"integer"},"body_format":{"type":"string","enum":["none","form-data","raw","text"]},"data_type":{"type":"string","enum":["csv","json","txt","xml"]},"pre_script_version_id":{"type":"string"},"post_script_version_id":{"type":"string"},"timeout":{"type":"integer"},"system":{"$ref":"#/components/schemas/Systems"},"variables":{"type":"array","items":{"$ref":"#/components/schemas/Variables"}},"endpoints":{"type":"array","items":{"$ref":"#/components/schemas/Endpoints"}},"pre_script_version":{"$ref":"#/components/schemas/ScriptVersions"},"post_script_version":{"$ref":"#/components/schemas/ScriptVersions"},"modified":{"type":"string"},"help_link":{"type":"string"},"disable_token_url_parameters":{"type":"boolean"}}},"AuthenticationType":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"label":{"type":"string"},"is_enabled":{"type":"boolean"},"hidden":{"type":"boolean"},"protocol":{"type":"string","enum":["HTTP","FTP","SFTP","FTPS","S3","MySQL","PGSQL","SQLSRV","PUBLIC","OCI"]}}},"ScriptVersions":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"script_id":{"type":"string"},"name":{"type":"string"},"version":{"type":"integer"},"status":{"type":"string","enum":["Draft","Inactive","Deployed"]},"deployment_failure_reason":{"type":"string"},"last_invoked_on":{"type":"string"},"deployed_at":{"type":"string","format":"date-time"},"deployment_failed_at":{"type":"string","format":"date-time"},"deploying":{"type":"boolean"},"content":{"type":"object"},"script":{"$ref":"#/components/schemas/Scripts"},"deployment_failure_detail":{"type":"string"},"is_draft":{"type":"boolean"}}},"Scripts":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier"},"script_template_id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string","items":{"type":"object"}},"language":{"type":"string","items":{"type":"object"},"enum":["c_sharp_8_0","go_1_18","go_1_23","go_1_26","rust_1_82","rust_1_94","node_18","node_20","node_22","node_24","php_8_1","php_8_2","php_8_3","php_8_4","php_8_5","python_3","mcp","ruby_3"]},"created_at":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"script_id":{"type":"integer"},"version":{"type":"string"},"deployed_at":{"type":"string"},"deployment_failed_at":{"type":"string"},"deploying":{"type":"string"},"deployment_failure_reason":{"type":"string"},"content":{"type":"string"},"ai_created":{"type":"boolean"},"value":{"type":"string"},"versions":{"type":"array","items":{"$ref":"#/components/schemas/ScriptVersions"}},"latest_version":{"$ref":"#/components/schemas/ScriptVersions"},"type":{"type":"string","enum":["custom","pre_auth","post_auth","pre_request","post_request","pagination"]},"updated_by":{"type":"string"},"updated_by_user":{"type":"string"},"versions_count":{"type":"integer"},"versions_remaining":{"type":"string"},"max_versions":{"type":"string"},"unlimited_versions":{"type":"boolean"}}},"Certificates":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"connector_id":{"type":"integer"},"certificate":{"type":"string"},"passphrase":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"object"},"user_id":{"type":"object"},"connector":{"$ref":"#/components/schemas/Connectors"},"user":{"type":"object"},"message_broker_id":{"type":"integer"}}},"SystemType":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"label":{"type":"string"},"system_templates":{"type":"array","items":{"$ref":"#/components/schemas/SystemTemplates"}}}},"SystemTemplates":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"label":{"type":"string"},"colour":{"type":"string","enum":["blue","blue_inverted","cyan","cyan_inverted","gray","gray_inverted","green","green_inverted","orange","orange_inverted","pink","pink_inverted","purple","purple_inverted","red","red_inverted","yellow","yellow_inverted"]},"logo_url":{"type":"string"},"version":{"type":"integer"},"version_name":{"type":"string"},"rate_limit_unit":{"type":"string","enum":["second","minute","hour","day"]},"protocol":{"type":"object","enum":["HTTP","FTP","SFTP","FTPS","S3","MySQL","PGSQL","SQLSRV","PUBLIC","OCI"]},"rate_limit_duration":{"type":"integer"},"system_type_id":{"type":"integer"},"system_type":{"$ref":"#/components/schemas/SystemType","enum":["Accounting","CRM","eCommerce","ERP","Marketplaces","Other","PIM","POS","3PL","WMS","Database"]},"date_format":{"type":"string"},"canonical_key":{"type":"object"},"company_id":{"type":"object"},"public_company_id":{"type":"object"},"company":{"type":"object"},"public_company":{"type":"object"},"logo":{"$ref":"#/components/schemas/MediaFiles"},"instances":{"type":"array","items":{"type":"object"}},"authentication_implementation_templates":{"type":"array","items":{"type":"object"}},"marketplace_company_id":{"type":"object"},"marketplace_company":{"type":"object"},"help_link":{"type":"string"}}},"EntityType":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"label":{"type":"string"}}},"EndpointSchema":{"type":"object","properties":{"id":{"type":"integer"},"endpoint_id":{"type":"integer"},"endpoint":{"$ref":"#/components/schemas/Endpoints"},"schema":{"type":"string"}}},"Filters":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"type":{"type":"string","enum":["string","string_length","number","absolute date","relative date","XPath","boolean","null","variable","array","array_length"]},"comparison":{"type":"string","enum":[">","<","==","<=",">=","!=","*","!*","NOT NULL","IS NULL","*[]","!*[]","regex"]},"value":{"type":"string"},"value_type":{"type":"string","enum":["string","integer","float","boolean","date"]},"keep_matching":{"type":"boolean"},"operator_logic":{"type":"string","enum":["and","or"]},"match_order":{"type":"boolean"},"is_default":{"type":"boolean"},"location":{"type":"string","enum":["header","body","url"]},"model_type":{"type":"string"},"model_id":{"type":"integer"},"date_format":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"field":{"type":"string"},"is_active":{"type":"boolean"}}},"DataPool":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"name":{"type":"string"},"description":{"type":"string"},"data_pool_template_id":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"FlowStepRoute":{"type":"object","properties":{"id":{"type":"integer"},"flow_step_id":{"type":"integer"},"name":{"type":"string"},"first_step_id":{"type":"integer"},"filter_logic_operator":{"type":"string","enum":["and","or"]},"filters":{"type":"array","items":{"$ref":"#/components/schemas/Filters"}},"first_step":{"$ref":"#/components/schemas/FlowSteps"},"order":{"type":"string"}}},"Caches":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"scope":{"type":"string","enum":["Flow run","Flow","Company"]},"ttl":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"flow_id":{"type":"integer"},"cache_template_id":{"type":"integer"},"content":{"type":"string"},"ttl_unit":{"type":"string"},"ttl_number":{"type":"string"},"flow":{"type":"object"}}},"PayloadMetadata":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"flow_version_id":{"type":"integer"},"flow_step_id":{"type":"integer"},"flow_run_id":{"type":"string"},"payload_store_reference":{"type":"string"},"payload_size":{"type":"string"},"dropped":{"type":"boolean"}}},"MessageBrokers":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"description":{"type":"string"},"host":{"type":"string","items":{"type":"object"}},"port":{"type":"integer","items":{"type":"object"}},"protocol":{"type":"string","enum":["AMQP-0-9-1","AMQP 1.0","IBM MQ","MQTT","STOMP"],"items":{"type":"object"}},"auth_type":{"type":"string","items":{"type":"object"},"enum":["Basic","x.509 Certificate"]},"variables":{"type":"array","items":{"$ref":"#/components/schemas/Variables"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"flows":{"type":"array","items":{"$ref":"#/components/schemas/Flows"}},"message_broker_queues":{"type":"array","items":{"$ref":"#/components/schemas/MessageBrokerQueues"}},"message_broker_queues_count":{"type":"array","items":{"type":"object"}},"flow_message_broker_queues":{"type":"array","items":{"$ref":"#/components/schemas/FlowMessageBrokerQueue"}},"certificate":{"$ref":"#/components/schemas/Certificates"}}},"MessageBrokerQueues":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier"},"flow_id":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"array","items":{"type":"object"}},"message_broker_id":{"type":"integer"},"flows":{"type":"array","items":{"$ref":"#/components/schemas/Flows"}},"message_broker":{"$ref":"#/components/schemas/MessageBrokers"},"consumer_type":{"type":"string","enum":["queue","topic"]},"subscription_name":{"type":"string"},"flows_count":{"type":"integer"},"user":{"type":"object"}}},"FlowMessageBrokerQueue":{"type":"object","properties":{"id":{"type":"integer"},"flow_id":{"type":"integer"},"message_broker_id":{"type":"integer"},"message_broker_queue_id":{"type":"string"},"last_error":{"type":"string"},"name":{"type":"string"},"message_broker":{"type":"object"},"flow":{"type":"object"}}},"FlowNotificationGroup":{"type":"object","properties":{"flow_id":{"type":"integer"},"notification_group_id":{"type":"integer"}}},"PaginationMeta":{"type":"object","properties":{"current_page":{"type":"integer"},"from":{"type":"integer","nullable":true},"last_page":{"type":"integer"},"path":{"type":"string"},"per_page":{"type":"integer"},"to":{"type":"integer","nullable":true},"total":{"type":"integer"}}},"PaginationLinks":{"type":"object","properties":{"first":{"type":"string","format":"uri"},"last":{"type":"string","format":"uri"},"prev":{"type":"string","format":"uri","nullable":true},"next":{"type":"string","format":"uri","nullable":true}}},"MessageResponse":{"type":"object","properties":{"message":{"type":"string"}}}}},"paths":{"/api/v1/flows/{flow}/version-metrics":{"get":{"summary":"List Flow Version Metrics","description":"Retrieves paginated metrics for a flow's versions. Results can be filtered by time interval, metric type, and key.","parameters":[{"name":"flow","in":"path","required":true,"schema":{"type":"string"},"description":"The flow identifier."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowsListResponse"}}}},"401":{"description":"Unauthenticated"},"403":{"description":"Unauthorized"},"404":{"description":"Not Found. The record does not exist.","content":{"application/json":{"schema":{"type":"string"}}}},"429":{"description":"Too Many Requests. The rate limit for this user has been reached.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current minute.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}}},"tags":["Flow Versions"],"operationId":"flowsVersionMetricsIndex"}}}}
```

## List Flow Version Schedules

> Retrieves a paginated list of all schedules for a specific flow version.

```json
{"openapi":"3.0.0","info":{"title":"Patchworks Core API","version":"1.0.0"},"tags":[{"name":"Flow Versions"}],"servers":[{"url":"https://core.wearepatchworks.com"}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"API key passed in the Authorization header. Format: `<api-key>`"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2 Bearer token obtained from POST /fabric/api/login"}},"schemas":{"FlowVersionsListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/FlowVersions"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"},"links":{"$ref":"#/components/schemas/PaginationLinks"}}},"FlowVersions":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"virtual_environment_id":{"type":"string"},"flow_version_id":{"type":"string"},"priority":{"type":"integer"},"cron_string":{"type":"string"},"microservice":{"type":"string"},"config":{"type":"string"},"flow_step_route_id":{"type":"integer"},"variables":{"type":"array","items":{"$ref":"#/components/schemas/FlowVersionVariable"}},"parent_id":{"type":"integer"},"type":{"type":"string"},"key":{"type":"string"},"value":{"type":"string"},"date_format":{"type":"string"},"secret":{"type":"string"},"enabled_at":{"type":"string"},"created_at":{"type":"string","format":"date-time","items":{"type":"object"}},"updated_at":{"type":"string","format":"date-time","items":{"type":"object"}},"flow_id":{"type":"integer"},"flow_name":{"type":"string"},"flow_priority":{"type":"string"},"iteration":{"type":"integer"},"status":{"type":"string","enum":["Draft","Inactive","Deployed"]},"is_deployed":{"type":"boolean"},"is_editable":{"type":"boolean"},"deployed_at":{"type":"string","format":"date-time"},"deployed_by":{"type":"object"},"deployed_by_user":{"type":"object"},"deployments":{"type":"array","items":{"$ref":"#/components/schemas/FlowVersionDeployment"}},"has_callback_step":{"type":"boolean"},"steps":{"type":"array","items":{"$ref":"#/components/schemas/FlowSteps"}},"runs":{"type":"array","items":{"type":"object"}},"latest_run":{"type":"string"},"schedules":{"type":"array","items":{"type":"object"}},"filters":{"type":"array","items":{"type":"object"}},"steps_count":{"type":"array","items":{"type":"object"}},"pivot":{"type":"string"},"saved_at":{"type":"string","format":"date-time"},"saved_by":{"type":"string"},"saved_by_user":{"type":"object"}}},"FlowVersionVariable":{"type":"object","properties":{"id":{"type":"integer"},"type":{"type":"string","enum":["string","number","absolute date","relative date","boolean"]},"value":{"type":"string"},"key":{"type":"string"},"date_format":{"type":"string"},"secret":{"type":"boolean"}}},"FlowVersionDeployment":{"type":"object","properties":{"id":{"type":"integer"},"flow_version_id":{"type":"integer"},"flow_version":{"$ref":"#/components/schemas/FlowVersions"},"virtual_environment_id":{"type":"integer"},"virtual_environment":{"$ref":"#/components/schemas/VirtualEnvironments"},"enabled_by":{"type":"string"},"enabled_by_user":{"type":"object"},"enabled_at":{"type":"string","format":"date-time"},"package_id":{"type":"integer"},"package":{"$ref":"#/components/schemas/Packages"},"user_id":{"type":"integer"},"user":{"type":"object"},"priority":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"VirtualEnvironments":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"notes":{"type":"string"},"deployed_at":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string"},"name":{"type":"string","items":{"type":"object"}},"description":{"type":"string","items":{"type":"object"}},"type":{"type":"string","items":{"type":"object"},"enum":["LIVE","TEST"]},"deployments":{"type":"array","items":{"$ref":"#/components/schemas/FlowVersionDeployment"}},"versions":{"type":"array","items":{"$ref":"#/components/schemas/VirtualEnvironmentVersions"}},"versions_count":{"type":"integer"},"first_version":{"$ref":"#/components/schemas/VirtualEnvironmentVersions"},"deployed_version":{"$ref":"#/components/schemas/VirtualEnvironmentVersions"},"flows":{"type":"string"},"is_deployed":{"type":"boolean"},"deployments_count":{"type":"array","items":{"type":"object"}},"pivot":{"type":"array","items":{"type":"object"}},"package_deployments":{"type":"array","items":{"$ref":"#/components/schemas/PackageVirtualEnvironment"}},"labels":{"type":"array","items":{"$ref":"#/components/schemas/Labels"}}}},"VirtualEnvironmentVersions":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"flow_id":{"type":"string"},"priority":{"type":"integer"},"model_type":{"type":"string"},"original_model_id":{"type":"string"},"replacement_model_id":{"type":"string"},"type":{"type":"string"},"key":{"type":"string"},"value":{"type":"string"},"fallback":{"type":"string"},"date_format":{"type":"string"},"secret":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"version":{"type":"object"},"virtual_environment_id":{"type":"integer"},"virtual_environment":{"$ref":"#/components/schemas/VirtualEnvironments"},"status":{"type":"string","enum":["Draft","Inactive","Deployed"]},"deployed_at":{"type":"string","format":"date-time"},"deployed_by":{"type":"array","items":{"type":"object"}},"notes":{"type":"array","items":{"type":"object"}},"manifests":{"type":"array","items":{"$ref":"#/components/schemas/VirtualEnvironmentVersionManifest"}},"variables":{"type":"array","items":{"$ref":"#/components/schemas/VirtualEnvironmentVersionVariable"}},"counts":{"type":"string"},"user_id":{"type":"object"},"user":{"type":"object"}}},"VirtualEnvironmentVersionManifest":{"type":"object","properties":{"id":{"type":"integer"},"virtual_environment_version_id":{"type":"integer"},"virtual_environment_version":{"$ref":"#/components/schemas/VirtualEnvironmentVersions"},"model_type":{"type":"string"},"original_model_id":{"type":"integer"},"original_model":{},"replacement_model_id":{"type":"integer"},"replacement_model":{},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"VirtualEnvironmentVersionVariable":{"type":"object","properties":{"id":{"type":"integer"},"virtual_environment_version_id":{"type":"integer"},"type":{"type":"string"},"value":{"type":"string"},"fallback":{"type":"string"},"key":{"type":"string"},"date_format":{"type":"string"},"secret":{"type":"boolean"}}},"PackageVirtualEnvironment":{"type":"object","properties":{"user":{"type":"object"},"package":{"$ref":"#/components/schemas/Packages"}}},"Packages":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"name":{"type":"string"},"notes":{"type":"string"},"created_by":{"type":"string","items":{"type":"object"}},"priority":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"created_by_user":{"type":"object"},"flow_versions":{"type":"array","items":{"$ref":"#/components/schemas/FlowVersions"}},"virtual_environments":{"type":"array","items":{"$ref":"#/components/schemas/VirtualEnvironments"}},"deployments":{"type":"array","items":{"$ref":"#/components/schemas/PackageVirtualEnvironment"}},"flow_versions_count":{"type":"integer"},"deployments_count":{"type":"integer"},"flow_version_deployments_count":{"type":"integer"}}},"Labels":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier"},"colour":{"type":"string","enum":["blue","blue_inverted","cyan","cyan_inverted","gray","gray_inverted","green","green_inverted","orange","orange_inverted","pink","pink_inverted","purple","purple_inverted","red","red_inverted","yellow","yellow_inverted"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"}}},"FlowSteps":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"first_step_id":{"type":"string"},"filter_logic_operator":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"flow_version_id":{"type":"integer"},"name":{"type":"string"},"microservice":{"type":"object","enum":["gateway","trigger","start","connector","pull","push","map","filter","route","script","manual-payload","assert-payload","split","batch","dedupe","cache","cache-set","cache-get","track","variable-set","run-flow","logging","events","notify","try-catch","branch","callback","data-transform","medium-processor","long-processor","scheduler","cross-reference"]},"config":{"type":"object"},"parent_id":{"type":"object"},"flow_version":{"$ref":"#/components/schemas/FlowVersions"},"children":{"type":"object"},"endpoint":{"$ref":"#/components/schemas/Endpoints"},"connector":{"$ref":"#/components/schemas/Connectors"},"data_pool":{"$ref":"#/components/schemas/DataPool"},"filters":{"type":"array","items":{"$ref":"#/components/schemas/Filters"}},"parent_flow_step":{"$ref":"#/components/schemas/FlowSteps"},"routes":{"type":"array","items":{"$ref":"#/components/schemas/FlowStepRoute"}},"variables":{"type":"array","items":{"$ref":"#/components/schemas/Variables"}},"script_version":{"$ref":"#/components/schemas/ScriptVersions"},"cache":{"$ref":"#/components/schemas/Caches"},"payloads":{"type":"array","items":{"$ref":"#/components/schemas/PayloadMetadata"}},"flow":{"$ref":"#/components/schemas/Flows"},"cross_references":{"type":"string"},"notes_count":{"type":"object"},"notification_group":{"type":"object"},"order":{"type":"string"}}},"Endpoints":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"field_path":{"type":"string"},"tags":{"type":"string"},"label":{"type":"string"},"key":{"type":"string"},"value":{"type":"string"},"secret":{"type":"string"},"variables":{"type":"array","items":{"$ref":"#/components/schemas/Variables"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"object"},"system_id":{"type":"integer"},"system":{"$ref":"#/components/schemas/Systems"},"entity_type_id":{"type":"integer"},"entity_type":{"$ref":"#/components/schemas/EntityType"},"endpoint":{"type":"string"},"http_method":{"type":"string","enum":["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"]},"data_type":{"type":"string","enum":["csv","json","txt","xml"]},"pagination_method":{"type":"string","enum":["Custom relative URI","Link Header","Next page token","Next Page URL","Page number parameter","Limit offset","default","PeopleVox","NetSuite SOAP","GraphQL Cursor","Database limit offset","Script"]},"deprecated_at":{"type":"string","format":"date-time"},"direction":{"type":"string","enum":["Send","Receive"]},"returns_multiple_records":{"type":"boolean"},"pre_script_version_id":{"type":"string"},"post_script_version_id":{"type":"string"},"endpoint_schema":{"$ref":"#/components/schemas/EndpointSchema"},"field_tags":{"type":"array","items":{"type":"object"}},"data_path":{"type":"array","items":{"type":"object"}},"body_format":{"type":"array","items":{"type":"object"},"enum":["none","form-data","raw","text"]},"raw_body":{"type":"array","items":{"type":"object"}},"filters":{"type":"array","items":{"$ref":"#/components/schemas/Filters"}},"modified":{"type":"array","items":{"type":"object"}},"help_link":{"type":"array","items":{"type":"object"}},"authentication_implementations":{"type":"array","items":{"$ref":"#/components/schemas/AuthenticationImplementations"}},"pre_script_version":{"$ref":"#/components/schemas/ScriptVersions"},"post_script_version":{"$ref":"#/components/schemas/ScriptVersions"},"disable_header_addition":{"type":"boolean"},"response_encoding":{"type":"string","enum":["base64","none"]}}},"Variables":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier"},"label":{"type":"string"},"key":{"type":"string"},"value":{"type":"string"},"secret":{"type":"boolean"},"locked":{"type":"boolean"},"configurable":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"modified":{"type":"string"},"pivot":{"type":"object"},"required":{"type":"boolean"},"advanced":{"type":"boolean"},"alias":{"type":"string"}}},"Systems":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"name":{"type":"string"},"entity_type_id":{"type":"integer"},"direction":{"type":"string","enum":["Send","Receive"]},"http_method":{"type":"string","enum":["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"]},"label":{"type":"string"},"colour":{"type":"string","enum":["blue","blue_inverted","cyan","cyan_inverted","gray","gray_inverted","green","green_inverted","orange","orange_inverted","pink","pink_inverted","purple","purple_inverted","red","red_inverted","yellow","yellow_inverted"]},"system_template_id":{"type":"integer"},"version":{"type":"integer"},"version_name":{"type":"string"},"system_type_id":{"type":"integer"},"protocol":{"type":"string","enum":["HTTP","FTP","SFTP","FTPS","S3","MySQL","PGSQL","SQLSRV","PUBLIC","OCI"]},"date_format":{"type":"string"},"help_link":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"rate_limit_unit":{"type":"string","enum":["second","minute","hour","day"]},"rate_limit_duration":{"type":"integer"},"endpoint":{"type":"string"},"method":{"type":"string"},"data_type":{"type":"string","enum":["csv","json","txt","xml"]},"body_format":{"type":"string","enum":["none","form-data","raw","text"]},"additional_endpoint_1":{"type":"string"},"additional_endpoint_2":{"type":"string"},"timeout":{"type":"integer"},"authentication_type_id":{"type":"string"},"returns_multiple_records":{"type":"string"},"pagination_method":{"type":"string","enum":["Custom relative URI","Link Header","Next page token","Next Page URL","Page number parameter","Limit offset","default","PeopleVox","NetSuite SOAP","GraphQL Cursor","Database limit offset","Script"]},"schema":{"type":"string"},"endpoint_template_id":{"type":"integer"},"data_path":{"type":"string"},"raw_body":{"type":"string"},"deprecated_at":{"type":"string"},"disable_header_addition":{"type":"string"},"response_encoding":{"type":"string","enum":["base64","none"]},"key":{"type":"string"},"value":{"type":"string"},"secret":{"type":"string"},"logo":{"$ref":"#/components/schemas/MediaFiles"},"pre_script_version_id":{"type":"string"},"post_script_version_id":{"type":"string"},"canonical_key":{"type":"array","items":{"type":"object"}},"connectors":{"type":"array","items":{"$ref":"#/components/schemas/Connectors"}},"system_type":{"$ref":"#/components/schemas/SystemType","enum":["Accounting","CRM","eCommerce","ERP","Marketplaces","Other","PIM","POS","3PL","WMS","Database"]},"system_template":{"$ref":"#/components/schemas/SystemTemplates"},"authentication_implementations":{"type":"array","items":{"$ref":"#/components/schemas/AuthenticationImplementations"}},"authentication_implementations_count":{"type":"array","items":{"type":"object"}},"endpoints":{"type":"array","items":{"$ref":"#/components/schemas/Endpoints"}},"variables":{"type":"array","items":{"$ref":"#/components/schemas/Variables"}},"updatable":{"type":"string"},"modified":{"type":"string"},"is_deployed":{"type":"boolean"}}},"MediaFiles":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"model_type":{"type":"string"},"model_id":{"type":"integer"},"file_name":{"type":"string"},"mime_type":{"type":"string"},"expires_at":{"type":"string","format":"date-time"},"is_expired":{"type":"boolean"}}},"Connectors":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"authentication_implementation_id":{"type":"integer"},"timezone":{"type":"string"},"date_format":{"type":"string"},"rate_limit_unit":{"type":"string","enum":["second","minute","hour","day"]},"rate_limit_duration":{"type":"integer"},"connection_pool_id":{"type":"integer"},"variables":{"type":"array","items":{"$ref":"#/components/schemas/Variables"}},"session_id":{"type":"string"},"platform_app_key":{"type":"string"},"certificate_id":{"type":"string"},"type":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"authentication_implementation":{"$ref":"#/components/schemas/AuthenticationImplementations"},"system":{"$ref":"#/components/schemas/Systems"},"certificate":{"$ref":"#/components/schemas/Certificates"}}},"AuthenticationImplementations":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"endpoint_ids":{"type":"string"},"label":{"type":"string"},"key":{"type":"string"},"value":{"type":"string"},"secret":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"endpoint":{"type":"string"},"method":{"type":"string"},"additional_endpoint_1":{"type":"string"},"additional_endpoint_2":{"type":"string"},"authentication_type_id":{"type":"integer"},"authentication_implementation_template_id":{"type":"integer"},"authentication_type":{"$ref":"#/components/schemas/AuthenticationType"},"system_id":{"type":"integer"},"body_format":{"type":"string","enum":["none","form-data","raw","text"]},"data_type":{"type":"string","enum":["csv","json","txt","xml"]},"pre_script_version_id":{"type":"string"},"post_script_version_id":{"type":"string"},"timeout":{"type":"integer"},"system":{"$ref":"#/components/schemas/Systems"},"variables":{"type":"array","items":{"$ref":"#/components/schemas/Variables"}},"endpoints":{"type":"array","items":{"$ref":"#/components/schemas/Endpoints"}},"pre_script_version":{"$ref":"#/components/schemas/ScriptVersions"},"post_script_version":{"$ref":"#/components/schemas/ScriptVersions"},"modified":{"type":"string"},"help_link":{"type":"string"},"disable_token_url_parameters":{"type":"boolean"}}},"AuthenticationType":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"label":{"type":"string"},"is_enabled":{"type":"boolean"},"hidden":{"type":"boolean"},"protocol":{"type":"string","enum":["HTTP","FTP","SFTP","FTPS","S3","MySQL","PGSQL","SQLSRV","PUBLIC","OCI"]}}},"ScriptVersions":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"script_id":{"type":"string"},"name":{"type":"string"},"version":{"type":"integer"},"status":{"type":"string","enum":["Draft","Inactive","Deployed"]},"deployment_failure_reason":{"type":"string"},"last_invoked_on":{"type":"string"},"deployed_at":{"type":"string","format":"date-time"},"deployment_failed_at":{"type":"string","format":"date-time"},"deploying":{"type":"boolean"},"content":{"type":"object"},"script":{"$ref":"#/components/schemas/Scripts"},"deployment_failure_detail":{"type":"string"},"is_draft":{"type":"boolean"}}},"Scripts":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier"},"script_template_id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string","items":{"type":"object"}},"language":{"type":"string","items":{"type":"object"},"enum":["c_sharp_8_0","go_1_18","go_1_23","go_1_26","rust_1_82","rust_1_94","node_18","node_20","node_22","node_24","php_8_1","php_8_2","php_8_3","php_8_4","php_8_5","python_3","mcp","ruby_3"]},"created_at":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"script_id":{"type":"integer"},"version":{"type":"string"},"deployed_at":{"type":"string"},"deployment_failed_at":{"type":"string"},"deploying":{"type":"string"},"deployment_failure_reason":{"type":"string"},"content":{"type":"string"},"ai_created":{"type":"boolean"},"value":{"type":"string"},"versions":{"type":"array","items":{"$ref":"#/components/schemas/ScriptVersions"}},"latest_version":{"$ref":"#/components/schemas/ScriptVersions"},"type":{"type":"string","enum":["custom","pre_auth","post_auth","pre_request","post_request","pagination"]},"updated_by":{"type":"string"},"updated_by_user":{"type":"string"},"versions_count":{"type":"integer"},"versions_remaining":{"type":"string"},"max_versions":{"type":"string"},"unlimited_versions":{"type":"boolean"}}},"Certificates":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"connector_id":{"type":"integer"},"certificate":{"type":"string"},"passphrase":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"object"},"user_id":{"type":"object"},"connector":{"$ref":"#/components/schemas/Connectors"},"user":{"type":"object"},"message_broker_id":{"type":"integer"}}},"SystemType":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"label":{"type":"string"},"system_templates":{"type":"array","items":{"$ref":"#/components/schemas/SystemTemplates"}}}},"SystemTemplates":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"label":{"type":"string"},"colour":{"type":"string","enum":["blue","blue_inverted","cyan","cyan_inverted","gray","gray_inverted","green","green_inverted","orange","orange_inverted","pink","pink_inverted","purple","purple_inverted","red","red_inverted","yellow","yellow_inverted"]},"logo_url":{"type":"string"},"version":{"type":"integer"},"version_name":{"type":"string"},"rate_limit_unit":{"type":"string","enum":["second","minute","hour","day"]},"protocol":{"type":"object","enum":["HTTP","FTP","SFTP","FTPS","S3","MySQL","PGSQL","SQLSRV","PUBLIC","OCI"]},"rate_limit_duration":{"type":"integer"},"system_type_id":{"type":"integer"},"system_type":{"$ref":"#/components/schemas/SystemType","enum":["Accounting","CRM","eCommerce","ERP","Marketplaces","Other","PIM","POS","3PL","WMS","Database"]},"date_format":{"type":"string"},"canonical_key":{"type":"object"},"company_id":{"type":"object"},"public_company_id":{"type":"object"},"company":{"type":"object"},"public_company":{"type":"object"},"logo":{"$ref":"#/components/schemas/MediaFiles"},"instances":{"type":"array","items":{"type":"object"}},"authentication_implementation_templates":{"type":"array","items":{"type":"object"}},"marketplace_company_id":{"type":"object"},"marketplace_company":{"type":"object"},"help_link":{"type":"string"}}},"EntityType":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"label":{"type":"string"}}},"EndpointSchema":{"type":"object","properties":{"id":{"type":"integer"},"endpoint_id":{"type":"integer"},"endpoint":{"$ref":"#/components/schemas/Endpoints"},"schema":{"type":"string"}}},"Filters":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"type":{"type":"string","enum":["string","string_length","number","absolute date","relative date","XPath","boolean","null","variable","array","array_length"]},"comparison":{"type":"string","enum":[">","<","==","<=",">=","!=","*","!*","NOT NULL","IS NULL","*[]","!*[]","regex"]},"value":{"type":"string"},"value_type":{"type":"string","enum":["string","integer","float","boolean","date"]},"keep_matching":{"type":"boolean"},"operator_logic":{"type":"string","enum":["and","or"]},"match_order":{"type":"boolean"},"is_default":{"type":"boolean"},"location":{"type":"string","enum":["header","body","url"]},"model_type":{"type":"string"},"model_id":{"type":"integer"},"date_format":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"field":{"type":"string"},"is_active":{"type":"boolean"}}},"DataPool":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"name":{"type":"string"},"description":{"type":"string"},"data_pool_template_id":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"FlowStepRoute":{"type":"object","properties":{"id":{"type":"integer"},"flow_step_id":{"type":"integer"},"name":{"type":"string"},"first_step_id":{"type":"integer"},"filter_logic_operator":{"type":"string","enum":["and","or"]},"filters":{"type":"array","items":{"$ref":"#/components/schemas/Filters"}},"first_step":{"$ref":"#/components/schemas/FlowSteps"},"order":{"type":"string"}}},"Caches":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"scope":{"type":"string","enum":["Flow run","Flow","Company"]},"ttl":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"flow_id":{"type":"integer"},"cache_template_id":{"type":"integer"},"content":{"type":"string"},"ttl_unit":{"type":"string"},"ttl_number":{"type":"string"},"flow":{"type":"object"}}},"PayloadMetadata":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"flow_version_id":{"type":"integer"},"flow_step_id":{"type":"integer"},"flow_run_id":{"type":"string"},"payload_store_reference":{"type":"string"},"payload_size":{"type":"string"},"dropped":{"type":"boolean"}}},"Flows":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"name":{"type":"string"},"enabled_at":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["Draft","Inactive","Deployed"]},"format":{"type":"string","enum":["csv","json","txt","xml"]},"body":{"type":"string"},"deployed_at":{"type":"string"},"labels":{"type":"array","items":{"$ref":"#/components/schemas/Labels"}},"notification_groups":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"description":{"type":"string"},"layout_direction":{"type":"string"},"is_enabled":{"type":"boolean"},"latest_version":{"$ref":"#/components/schemas/FlowVersions"},"current_version":{"$ref":"#/components/schemas/FlowVersions"},"deployed_version":{"$ref":"#/components/schemas/FlowVersions"},"latest_deployed_version":{"$ref":"#/components/schemas/FlowVersions"},"versions":{"type":"array","items":{"$ref":"#/components/schemas/FlowVersions"}},"version_type_counts":{"type":"array","items":{"type":"object"}},"message_brokers":{"type":"array","items":{"$ref":"#/components/schemas/MessageBrokers"}},"message_broker_queues":{"type":"array","items":{"$ref":"#/components/schemas/MessageBrokerQueues"}},"notification_group_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlowNotificationGroup"}},"webhooks":{"type":"array","items":{"type":"object"}},"callbacks":{"type":"array","items":{"type":"object"}},"current_version_step_count":{"type":"integer"},"current_version_connector_count":{"type":"integer"},"current_version_script_count":{"type":"integer"},"current_version_cache_count":{"type":"integer"},"current_version_data_pool_count":{"type":"integer"},"current_version_cross_ref_count":{"type":"integer"},"use_queued_time":{"type":"boolean"},"remove_failed_payloads":{"type":"boolean"},"priority":{"type":"array","items":{"type":"object"}},"prod_flag":{"type":"boolean"},"deployments":{"type":"array","items":{"$ref":"#/components/schemas/FlowVersionDeployment"}},"webhooks_count":{"type":"integer"},"callbacks_count":{"type":"integer"},"marketplace_app_id":{"type":"integer"},"blueprint_id":{"type":"integer"},"blueprint_version_number":{"type":"string"},"flow_folder_id":{"type":"integer"},"flow_message_broker_queues":{"type":"array","items":{"$ref":"#/components/schemas/FlowMessageBrokerQueue"}},"max_concurrency":{"type":"integer"}}},"MessageBrokers":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"description":{"type":"string"},"host":{"type":"string","items":{"type":"object"}},"port":{"type":"integer","items":{"type":"object"}},"protocol":{"type":"string","enum":["AMQP-0-9-1","AMQP 1.0","IBM MQ","MQTT","STOMP"],"items":{"type":"object"}},"auth_type":{"type":"string","items":{"type":"object"},"enum":["Basic","x.509 Certificate"]},"variables":{"type":"array","items":{"$ref":"#/components/schemas/Variables"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"flows":{"type":"array","items":{"$ref":"#/components/schemas/Flows"}},"message_broker_queues":{"type":"array","items":{"$ref":"#/components/schemas/MessageBrokerQueues"}},"message_broker_queues_count":{"type":"array","items":{"type":"object"}},"flow_message_broker_queues":{"type":"array","items":{"$ref":"#/components/schemas/FlowMessageBrokerQueue"}},"certificate":{"$ref":"#/components/schemas/Certificates"}}},"MessageBrokerQueues":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier"},"flow_id":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"array","items":{"type":"object"}},"message_broker_id":{"type":"integer"},"flows":{"type":"array","items":{"$ref":"#/components/schemas/Flows"}},"message_broker":{"$ref":"#/components/schemas/MessageBrokers"},"consumer_type":{"type":"string","enum":["queue","topic"]},"subscription_name":{"type":"string"},"flows_count":{"type":"integer"},"user":{"type":"object"}}},"FlowMessageBrokerQueue":{"type":"object","properties":{"id":{"type":"integer"},"flow_id":{"type":"integer"},"message_broker_id":{"type":"integer"},"message_broker_queue_id":{"type":"string"},"last_error":{"type":"string"},"name":{"type":"string"},"message_broker":{"type":"object"},"flow":{"type":"object"}}},"FlowNotificationGroup":{"type":"object","properties":{"flow_id":{"type":"integer"},"notification_group_id":{"type":"integer"}}},"PaginationMeta":{"type":"object","properties":{"current_page":{"type":"integer"},"from":{"type":"integer","nullable":true},"last_page":{"type":"integer"},"path":{"type":"string"},"per_page":{"type":"integer"},"to":{"type":"integer","nullable":true},"total":{"type":"integer"}}},"PaginationLinks":{"type":"object","properties":{"first":{"type":"string","format":"uri"},"last":{"type":"string","format":"uri"},"prev":{"type":"string","format":"uri","nullable":true},"next":{"type":"string","format":"uri","nullable":true}}},"MessageResponse":{"type":"object","properties":{"message":{"type":"string"}}}}},"paths":{"/api/v1/flow-versions/{flow_version}/schedules":{"get":{"summary":"List Flow Version Schedules","description":"Retrieves a paginated list of all schedules for a specific flow version.","parameters":[{"name":"flow_version","in":"path","required":true,"schema":{"type":"string"},"description":"The flow version identifier."},{"name":"filter[flow_version_id]","in":"query","required":false,"schema":{"type":"array","items":{"type":"integer"}},"description":"Filter results by flow_version_id.","style":"form","explode":false},{"name":"include","in":"query","required":false,"schema":{"type":"array","items":{"type":"string","enum":["flowVersion"]}},"description":"Comma-separated list of relationships to include. Available: flowVersion","style":"form","explode":false},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1},"description":"Page number for pagination."},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100},"description":"Number of results per page."},{"name":"filter[cron_string]","in":"query","required":false,"schema":{"type":"string"},"description":"Filter results by cron_string."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowVersionsListResponse"}}}},"401":{"description":"Unauthenticated"},"403":{"description":"Unauthorized"},"404":{"description":"Not Found. The record does not exist.","content":{"application/json":{"schema":{"type":"string"}}}},"429":{"description":"Too Many Requests. The rate limit for this user has been reached.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current minute.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}}},"tags":["Flow Versions"],"operationId":"flowVersionsSchedulesIndex"}}}}
```

## Create Flow Version Schedule

> Creates a new schedule for a flow version using a \`cron\_string\`.

```json
{"openapi":"3.0.0","info":{"title":"Patchworks Core API","version":"1.0.0"},"tags":[{"name":"Flow Versions"}],"servers":[{"url":"https://core.wearepatchworks.com"}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"API key passed in the Authorization header. Format: `<api-key>`"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2 Bearer token obtained from POST /fabric/api/login"}},"schemas":{"FlowVersionsResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/FlowVersions"}}},"FlowVersions":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"virtual_environment_id":{"type":"string"},"flow_version_id":{"type":"string"},"priority":{"type":"integer"},"cron_string":{"type":"string"},"microservice":{"type":"string"},"config":{"type":"string"},"flow_step_route_id":{"type":"integer"},"variables":{"type":"array","items":{"$ref":"#/components/schemas/FlowVersionVariable"}},"parent_id":{"type":"integer"},"type":{"type":"string"},"key":{"type":"string"},"value":{"type":"string"},"date_format":{"type":"string"},"secret":{"type":"string"},"enabled_at":{"type":"string"},"created_at":{"type":"string","format":"date-time","items":{"type":"object"}},"updated_at":{"type":"string","format":"date-time","items":{"type":"object"}},"flow_id":{"type":"integer"},"flow_name":{"type":"string"},"flow_priority":{"type":"string"},"iteration":{"type":"integer"},"status":{"type":"string","enum":["Draft","Inactive","Deployed"]},"is_deployed":{"type":"boolean"},"is_editable":{"type":"boolean"},"deployed_at":{"type":"string","format":"date-time"},"deployed_by":{"type":"object"},"deployed_by_user":{"type":"object"},"deployments":{"type":"array","items":{"$ref":"#/components/schemas/FlowVersionDeployment"}},"has_callback_step":{"type":"boolean"},"steps":{"type":"array","items":{"$ref":"#/components/schemas/FlowSteps"}},"runs":{"type":"array","items":{"type":"object"}},"latest_run":{"type":"string"},"schedules":{"type":"array","items":{"type":"object"}},"filters":{"type":"array","items":{"type":"object"}},"steps_count":{"type":"array","items":{"type":"object"}},"pivot":{"type":"string"},"saved_at":{"type":"string","format":"date-time"},"saved_by":{"type":"string"},"saved_by_user":{"type":"object"}}},"FlowVersionVariable":{"type":"object","properties":{"id":{"type":"integer"},"type":{"type":"string","enum":["string","number","absolute date","relative date","boolean"]},"value":{"type":"string"},"key":{"type":"string"},"date_format":{"type":"string"},"secret":{"type":"boolean"}}},"FlowVersionDeployment":{"type":"object","properties":{"id":{"type":"integer"},"flow_version_id":{"type":"integer"},"flow_version":{"$ref":"#/components/schemas/FlowVersions"},"virtual_environment_id":{"type":"integer"},"virtual_environment":{"$ref":"#/components/schemas/VirtualEnvironments"},"enabled_by":{"type":"string"},"enabled_by_user":{"type":"object"},"enabled_at":{"type":"string","format":"date-time"},"package_id":{"type":"integer"},"package":{"$ref":"#/components/schemas/Packages"},"user_id":{"type":"integer"},"user":{"type":"object"},"priority":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"VirtualEnvironments":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"notes":{"type":"string"},"deployed_at":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string"},"name":{"type":"string","items":{"type":"object"}},"description":{"type":"string","items":{"type":"object"}},"type":{"type":"string","items":{"type":"object"},"enum":["LIVE","TEST"]},"deployments":{"type":"array","items":{"$ref":"#/components/schemas/FlowVersionDeployment"}},"versions":{"type":"array","items":{"$ref":"#/components/schemas/VirtualEnvironmentVersions"}},"versions_count":{"type":"integer"},"first_version":{"$ref":"#/components/schemas/VirtualEnvironmentVersions"},"deployed_version":{"$ref":"#/components/schemas/VirtualEnvironmentVersions"},"flows":{"type":"string"},"is_deployed":{"type":"boolean"},"deployments_count":{"type":"array","items":{"type":"object"}},"pivot":{"type":"array","items":{"type":"object"}},"package_deployments":{"type":"array","items":{"$ref":"#/components/schemas/PackageVirtualEnvironment"}},"labels":{"type":"array","items":{"$ref":"#/components/schemas/Labels"}}}},"VirtualEnvironmentVersions":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"flow_id":{"type":"string"},"priority":{"type":"integer"},"model_type":{"type":"string"},"original_model_id":{"type":"string"},"replacement_model_id":{"type":"string"},"type":{"type":"string"},"key":{"type":"string"},"value":{"type":"string"},"fallback":{"type":"string"},"date_format":{"type":"string"},"secret":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"version":{"type":"object"},"virtual_environment_id":{"type":"integer"},"virtual_environment":{"$ref":"#/components/schemas/VirtualEnvironments"},"status":{"type":"string","enum":["Draft","Inactive","Deployed"]},"deployed_at":{"type":"string","format":"date-time"},"deployed_by":{"type":"array","items":{"type":"object"}},"notes":{"type":"array","items":{"type":"object"}},"manifests":{"type":"array","items":{"$ref":"#/components/schemas/VirtualEnvironmentVersionManifest"}},"variables":{"type":"array","items":{"$ref":"#/components/schemas/VirtualEnvironmentVersionVariable"}},"counts":{"type":"string"},"user_id":{"type":"object"},"user":{"type":"object"}}},"VirtualEnvironmentVersionManifest":{"type":"object","properties":{"id":{"type":"integer"},"virtual_environment_version_id":{"type":"integer"},"virtual_environment_version":{"$ref":"#/components/schemas/VirtualEnvironmentVersions"},"model_type":{"type":"string"},"original_model_id":{"type":"integer"},"original_model":{},"replacement_model_id":{"type":"integer"},"replacement_model":{},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"VirtualEnvironmentVersionVariable":{"type":"object","properties":{"id":{"type":"integer"},"virtual_environment_version_id":{"type":"integer"},"type":{"type":"string"},"value":{"type":"string"},"fallback":{"type":"string"},"key":{"type":"string"},"date_format":{"type":"string"},"secret":{"type":"boolean"}}},"PackageVirtualEnvironment":{"type":"object","properties":{"user":{"type":"object"},"package":{"$ref":"#/components/schemas/Packages"}}},"Packages":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"name":{"type":"string"},"notes":{"type":"string"},"created_by":{"type":"string","items":{"type":"object"}},"priority":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"created_by_user":{"type":"object"},"flow_versions":{"type":"array","items":{"$ref":"#/components/schemas/FlowVersions"}},"virtual_environments":{"type":"array","items":{"$ref":"#/components/schemas/VirtualEnvironments"}},"deployments":{"type":"array","items":{"$ref":"#/components/schemas/PackageVirtualEnvironment"}},"flow_versions_count":{"type":"integer"},"deployments_count":{"type":"integer"},"flow_version_deployments_count":{"type":"integer"}}},"Labels":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier"},"colour":{"type":"string","enum":["blue","blue_inverted","cyan","cyan_inverted","gray","gray_inverted","green","green_inverted","orange","orange_inverted","pink","pink_inverted","purple","purple_inverted","red","red_inverted","yellow","yellow_inverted"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"}}},"FlowSteps":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"first_step_id":{"type":"string"},"filter_logic_operator":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"flow_version_id":{"type":"integer"},"name":{"type":"string"},"microservice":{"type":"object","enum":["gateway","trigger","start","connector","pull","push","map","filter","route","script","manual-payload","assert-payload","split","batch","dedupe","cache","cache-set","cache-get","track","variable-set","run-flow","logging","events","notify","try-catch","branch","callback","data-transform","medium-processor","long-processor","scheduler","cross-reference"]},"config":{"type":"object"},"parent_id":{"type":"object"},"flow_version":{"$ref":"#/components/schemas/FlowVersions"},"children":{"type":"object"},"endpoint":{"$ref":"#/components/schemas/Endpoints"},"connector":{"$ref":"#/components/schemas/Connectors"},"data_pool":{"$ref":"#/components/schemas/DataPool"},"filters":{"type":"array","items":{"$ref":"#/components/schemas/Filters"}},"parent_flow_step":{"$ref":"#/components/schemas/FlowSteps"},"routes":{"type":"array","items":{"$ref":"#/components/schemas/FlowStepRoute"}},"variables":{"type":"array","items":{"$ref":"#/components/schemas/Variables"}},"script_version":{"$ref":"#/components/schemas/ScriptVersions"},"cache":{"$ref":"#/components/schemas/Caches"},"payloads":{"type":"array","items":{"$ref":"#/components/schemas/PayloadMetadata"}},"flow":{"$ref":"#/components/schemas/Flows"},"cross_references":{"type":"string"},"notes_count":{"type":"object"},"notification_group":{"type":"object"},"order":{"type":"string"}}},"Endpoints":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"field_path":{"type":"string"},"tags":{"type":"string"},"label":{"type":"string"},"key":{"type":"string"},"value":{"type":"string"},"secret":{"type":"string"},"variables":{"type":"array","items":{"$ref":"#/components/schemas/Variables"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"object"},"system_id":{"type":"integer"},"system":{"$ref":"#/components/schemas/Systems"},"entity_type_id":{"type":"integer"},"entity_type":{"$ref":"#/components/schemas/EntityType"},"endpoint":{"type":"string"},"http_method":{"type":"string","enum":["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"]},"data_type":{"type":"string","enum":["csv","json","txt","xml"]},"pagination_method":{"type":"string","enum":["Custom relative URI","Link Header","Next page token","Next Page URL","Page number parameter","Limit offset","default","PeopleVox","NetSuite SOAP","GraphQL Cursor","Database limit offset","Script"]},"deprecated_at":{"type":"string","format":"date-time"},"direction":{"type":"string","enum":["Send","Receive"]},"returns_multiple_records":{"type":"boolean"},"pre_script_version_id":{"type":"string"},"post_script_version_id":{"type":"string"},"endpoint_schema":{"$ref":"#/components/schemas/EndpointSchema"},"field_tags":{"type":"array","items":{"type":"object"}},"data_path":{"type":"array","items":{"type":"object"}},"body_format":{"type":"array","items":{"type":"object"},"enum":["none","form-data","raw","text"]},"raw_body":{"type":"array","items":{"type":"object"}},"filters":{"type":"array","items":{"$ref":"#/components/schemas/Filters"}},"modified":{"type":"array","items":{"type":"object"}},"help_link":{"type":"array","items":{"type":"object"}},"authentication_implementations":{"type":"array","items":{"$ref":"#/components/schemas/AuthenticationImplementations"}},"pre_script_version":{"$ref":"#/components/schemas/ScriptVersions"},"post_script_version":{"$ref":"#/components/schemas/ScriptVersions"},"disable_header_addition":{"type":"boolean"},"response_encoding":{"type":"string","enum":["base64","none"]}}},"Variables":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier"},"label":{"type":"string"},"key":{"type":"string"},"value":{"type":"string"},"secret":{"type":"boolean"},"locked":{"type":"boolean"},"configurable":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"modified":{"type":"string"},"pivot":{"type":"object"},"required":{"type":"boolean"},"advanced":{"type":"boolean"},"alias":{"type":"string"}}},"Systems":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"name":{"type":"string"},"entity_type_id":{"type":"integer"},"direction":{"type":"string","enum":["Send","Receive"]},"http_method":{"type":"string","enum":["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"]},"label":{"type":"string"},"colour":{"type":"string","enum":["blue","blue_inverted","cyan","cyan_inverted","gray","gray_inverted","green","green_inverted","orange","orange_inverted","pink","pink_inverted","purple","purple_inverted","red","red_inverted","yellow","yellow_inverted"]},"system_template_id":{"type":"integer"},"version":{"type":"integer"},"version_name":{"type":"string"},"system_type_id":{"type":"integer"},"protocol":{"type":"string","enum":["HTTP","FTP","SFTP","FTPS","S3","MySQL","PGSQL","SQLSRV","PUBLIC","OCI"]},"date_format":{"type":"string"},"help_link":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"rate_limit_unit":{"type":"string","enum":["second","minute","hour","day"]},"rate_limit_duration":{"type":"integer"},"endpoint":{"type":"string"},"method":{"type":"string"},"data_type":{"type":"string","enum":["csv","json","txt","xml"]},"body_format":{"type":"string","enum":["none","form-data","raw","text"]},"additional_endpoint_1":{"type":"string"},"additional_endpoint_2":{"type":"string"},"timeout":{"type":"integer"},"authentication_type_id":{"type":"string"},"returns_multiple_records":{"type":"string"},"pagination_method":{"type":"string","enum":["Custom relative URI","Link Header","Next page token","Next Page URL","Page number parameter","Limit offset","default","PeopleVox","NetSuite SOAP","GraphQL Cursor","Database limit offset","Script"]},"schema":{"type":"string"},"endpoint_template_id":{"type":"integer"},"data_path":{"type":"string"},"raw_body":{"type":"string"},"deprecated_at":{"type":"string"},"disable_header_addition":{"type":"string"},"response_encoding":{"type":"string","enum":["base64","none"]},"key":{"type":"string"},"value":{"type":"string"},"secret":{"type":"string"},"logo":{"$ref":"#/components/schemas/MediaFiles"},"pre_script_version_id":{"type":"string"},"post_script_version_id":{"type":"string"},"canonical_key":{"type":"array","items":{"type":"object"}},"connectors":{"type":"array","items":{"$ref":"#/components/schemas/Connectors"}},"system_type":{"$ref":"#/components/schemas/SystemType","enum":["Accounting","CRM","eCommerce","ERP","Marketplaces","Other","PIM","POS","3PL","WMS","Database"]},"system_template":{"$ref":"#/components/schemas/SystemTemplates"},"authentication_implementations":{"type":"array","items":{"$ref":"#/components/schemas/AuthenticationImplementations"}},"authentication_implementations_count":{"type":"array","items":{"type":"object"}},"endpoints":{"type":"array","items":{"$ref":"#/components/schemas/Endpoints"}},"variables":{"type":"array","items":{"$ref":"#/components/schemas/Variables"}},"updatable":{"type":"string"},"modified":{"type":"string"},"is_deployed":{"type":"boolean"}}},"MediaFiles":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"model_type":{"type":"string"},"model_id":{"type":"integer"},"file_name":{"type":"string"},"mime_type":{"type":"string"},"expires_at":{"type":"string","format":"date-time"},"is_expired":{"type":"boolean"}}},"Connectors":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"authentication_implementation_id":{"type":"integer"},"timezone":{"type":"string"},"date_format":{"type":"string"},"rate_limit_unit":{"type":"string","enum":["second","minute","hour","day"]},"rate_limit_duration":{"type":"integer"},"connection_pool_id":{"type":"integer"},"variables":{"type":"array","items":{"$ref":"#/components/schemas/Variables"}},"session_id":{"type":"string"},"platform_app_key":{"type":"string"},"certificate_id":{"type":"string"},"type":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"authentication_implementation":{"$ref":"#/components/schemas/AuthenticationImplementations"},"system":{"$ref":"#/components/schemas/Systems"},"certificate":{"$ref":"#/components/schemas/Certificates"}}},"AuthenticationImplementations":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"endpoint_ids":{"type":"string"},"label":{"type":"string"},"key":{"type":"string"},"value":{"type":"string"},"secret":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"endpoint":{"type":"string"},"method":{"type":"string"},"additional_endpoint_1":{"type":"string"},"additional_endpoint_2":{"type":"string"},"authentication_type_id":{"type":"integer"},"authentication_implementation_template_id":{"type":"integer"},"authentication_type":{"$ref":"#/components/schemas/AuthenticationType"},"system_id":{"type":"integer"},"body_format":{"type":"string","enum":["none","form-data","raw","text"]},"data_type":{"type":"string","enum":["csv","json","txt","xml"]},"pre_script_version_id":{"type":"string"},"post_script_version_id":{"type":"string"},"timeout":{"type":"integer"},"system":{"$ref":"#/components/schemas/Systems"},"variables":{"type":"array","items":{"$ref":"#/components/schemas/Variables"}},"endpoints":{"type":"array","items":{"$ref":"#/components/schemas/Endpoints"}},"pre_script_version":{"$ref":"#/components/schemas/ScriptVersions"},"post_script_version":{"$ref":"#/components/schemas/ScriptVersions"},"modified":{"type":"string"},"help_link":{"type":"string"},"disable_token_url_parameters":{"type":"boolean"}}},"AuthenticationType":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"label":{"type":"string"},"is_enabled":{"type":"boolean"},"hidden":{"type":"boolean"},"protocol":{"type":"string","enum":["HTTP","FTP","SFTP","FTPS","S3","MySQL","PGSQL","SQLSRV","PUBLIC","OCI"]}}},"ScriptVersions":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"script_id":{"type":"string"},"name":{"type":"string"},"version":{"type":"integer"},"status":{"type":"string","enum":["Draft","Inactive","Deployed"]},"deployment_failure_reason":{"type":"string"},"last_invoked_on":{"type":"string"},"deployed_at":{"type":"string","format":"date-time"},"deployment_failed_at":{"type":"string","format":"date-time"},"deploying":{"type":"boolean"},"content":{"type":"object"},"script":{"$ref":"#/components/schemas/Scripts"},"deployment_failure_detail":{"type":"string"},"is_draft":{"type":"boolean"}}},"Scripts":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier"},"script_template_id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string","items":{"type":"object"}},"language":{"type":"string","items":{"type":"object"},"enum":["c_sharp_8_0","go_1_18","go_1_23","go_1_26","rust_1_82","rust_1_94","node_18","node_20","node_22","node_24","php_8_1","php_8_2","php_8_3","php_8_4","php_8_5","python_3","mcp","ruby_3"]},"created_at":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"script_id":{"type":"integer"},"version":{"type":"string"},"deployed_at":{"type":"string"},"deployment_failed_at":{"type":"string"},"deploying":{"type":"string"},"deployment_failure_reason":{"type":"string"},"content":{"type":"string"},"ai_created":{"type":"boolean"},"value":{"type":"string"},"versions":{"type":"array","items":{"$ref":"#/components/schemas/ScriptVersions"}},"latest_version":{"$ref":"#/components/schemas/ScriptVersions"},"type":{"type":"string","enum":["custom","pre_auth","post_auth","pre_request","post_request","pagination"]},"updated_by":{"type":"string"},"updated_by_user":{"type":"string"},"versions_count":{"type":"integer"},"versions_remaining":{"type":"string"},"max_versions":{"type":"string"},"unlimited_versions":{"type":"boolean"}}},"Certificates":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"connector_id":{"type":"integer"},"certificate":{"type":"string"},"passphrase":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"object"},"user_id":{"type":"object"},"connector":{"$ref":"#/components/schemas/Connectors"},"user":{"type":"object"},"message_broker_id":{"type":"integer"}}},"SystemType":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"label":{"type":"string"},"system_templates":{"type":"array","items":{"$ref":"#/components/schemas/SystemTemplates"}}}},"SystemTemplates":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"label":{"type":"string"},"colour":{"type":"string","enum":["blue","blue_inverted","cyan","cyan_inverted","gray","gray_inverted","green","green_inverted","orange","orange_inverted","pink","pink_inverted","purple","purple_inverted","red","red_inverted","yellow","yellow_inverted"]},"logo_url":{"type":"string"},"version":{"type":"integer"},"version_name":{"type":"string"},"rate_limit_unit":{"type":"string","enum":["second","minute","hour","day"]},"protocol":{"type":"object","enum":["HTTP","FTP","SFTP","FTPS","S3","MySQL","PGSQL","SQLSRV","PUBLIC","OCI"]},"rate_limit_duration":{"type":"integer"},"system_type_id":{"type":"integer"},"system_type":{"$ref":"#/components/schemas/SystemType","enum":["Accounting","CRM","eCommerce","ERP","Marketplaces","Other","PIM","POS","3PL","WMS","Database"]},"date_format":{"type":"string"},"canonical_key":{"type":"object"},"company_id":{"type":"object"},"public_company_id":{"type":"object"},"company":{"type":"object"},"public_company":{"type":"object"},"logo":{"$ref":"#/components/schemas/MediaFiles"},"instances":{"type":"array","items":{"type":"object"}},"authentication_implementation_templates":{"type":"array","items":{"type":"object"}},"marketplace_company_id":{"type":"object"},"marketplace_company":{"type":"object"},"help_link":{"type":"string"}}},"EntityType":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"label":{"type":"string"}}},"EndpointSchema":{"type":"object","properties":{"id":{"type":"integer"},"endpoint_id":{"type":"integer"},"endpoint":{"$ref":"#/components/schemas/Endpoints"},"schema":{"type":"string"}}},"Filters":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"type":{"type":"string","enum":["string","string_length","number","absolute date","relative date","XPath","boolean","null","variable","array","array_length"]},"comparison":{"type":"string","enum":[">","<","==","<=",">=","!=","*","!*","NOT NULL","IS NULL","*[]","!*[]","regex"]},"value":{"type":"string"},"value_type":{"type":"string","enum":["string","integer","float","boolean","date"]},"keep_matching":{"type":"boolean"},"operator_logic":{"type":"string","enum":["and","or"]},"match_order":{"type":"boolean"},"is_default":{"type":"boolean"},"location":{"type":"string","enum":["header","body","url"]},"model_type":{"type":"string"},"model_id":{"type":"integer"},"date_format":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"field":{"type":"string"},"is_active":{"type":"boolean"}}},"DataPool":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"name":{"type":"string"},"description":{"type":"string"},"data_pool_template_id":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"FlowStepRoute":{"type":"object","properties":{"id":{"type":"integer"},"flow_step_id":{"type":"integer"},"name":{"type":"string"},"first_step_id":{"type":"integer"},"filter_logic_operator":{"type":"string","enum":["and","or"]},"filters":{"type":"array","items":{"$ref":"#/components/schemas/Filters"}},"first_step":{"$ref":"#/components/schemas/FlowSteps"},"order":{"type":"string"}}},"Caches":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"scope":{"type":"string","enum":["Flow run","Flow","Company"]},"ttl":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"flow_id":{"type":"integer"},"cache_template_id":{"type":"integer"},"content":{"type":"string"},"ttl_unit":{"type":"string"},"ttl_number":{"type":"string"},"flow":{"type":"object"}}},"PayloadMetadata":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"flow_version_id":{"type":"integer"},"flow_step_id":{"type":"integer"},"flow_run_id":{"type":"string"},"payload_store_reference":{"type":"string"},"payload_size":{"type":"string"},"dropped":{"type":"boolean"}}},"Flows":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"name":{"type":"string"},"enabled_at":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["Draft","Inactive","Deployed"]},"format":{"type":"string","enum":["csv","json","txt","xml"]},"body":{"type":"string"},"deployed_at":{"type":"string"},"labels":{"type":"array","items":{"$ref":"#/components/schemas/Labels"}},"notification_groups":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"description":{"type":"string"},"layout_direction":{"type":"string"},"is_enabled":{"type":"boolean"},"latest_version":{"$ref":"#/components/schemas/FlowVersions"},"current_version":{"$ref":"#/components/schemas/FlowVersions"},"deployed_version":{"$ref":"#/components/schemas/FlowVersions"},"latest_deployed_version":{"$ref":"#/components/schemas/FlowVersions"},"versions":{"type":"array","items":{"$ref":"#/components/schemas/FlowVersions"}},"version_type_counts":{"type":"array","items":{"type":"object"}},"message_brokers":{"type":"array","items":{"$ref":"#/components/schemas/MessageBrokers"}},"message_broker_queues":{"type":"array","items":{"$ref":"#/components/schemas/MessageBrokerQueues"}},"notification_group_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlowNotificationGroup"}},"webhooks":{"type":"array","items":{"type":"object"}},"callbacks":{"type":"array","items":{"type":"object"}},"current_version_step_count":{"type":"integer"},"current_version_connector_count":{"type":"integer"},"current_version_script_count":{"type":"integer"},"current_version_cache_count":{"type":"integer"},"current_version_data_pool_count":{"type":"integer"},"current_version_cross_ref_count":{"type":"integer"},"use_queued_time":{"type":"boolean"},"remove_failed_payloads":{"type":"boolean"},"priority":{"type":"array","items":{"type":"object"}},"prod_flag":{"type":"boolean"},"deployments":{"type":"array","items":{"$ref":"#/components/schemas/FlowVersionDeployment"}},"webhooks_count":{"type":"integer"},"callbacks_count":{"type":"integer"},"marketplace_app_id":{"type":"integer"},"blueprint_id":{"type":"integer"},"blueprint_version_number":{"type":"string"},"flow_folder_id":{"type":"integer"},"flow_message_broker_queues":{"type":"array","items":{"$ref":"#/components/schemas/FlowMessageBrokerQueue"}},"max_concurrency":{"type":"integer"}}},"MessageBrokers":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"description":{"type":"string"},"host":{"type":"string","items":{"type":"object"}},"port":{"type":"integer","items":{"type":"object"}},"protocol":{"type":"string","enum":["AMQP-0-9-1","AMQP 1.0","IBM MQ","MQTT","STOMP"],"items":{"type":"object"}},"auth_type":{"type":"string","items":{"type":"object"},"enum":["Basic","x.509 Certificate"]},"variables":{"type":"array","items":{"$ref":"#/components/schemas/Variables"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"flows":{"type":"array","items":{"$ref":"#/components/schemas/Flows"}},"message_broker_queues":{"type":"array","items":{"$ref":"#/components/schemas/MessageBrokerQueues"}},"message_broker_queues_count":{"type":"array","items":{"type":"object"}},"flow_message_broker_queues":{"type":"array","items":{"$ref":"#/components/schemas/FlowMessageBrokerQueue"}},"certificate":{"$ref":"#/components/schemas/Certificates"}}},"MessageBrokerQueues":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier"},"flow_id":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"array","items":{"type":"object"}},"message_broker_id":{"type":"integer"},"flows":{"type":"array","items":{"$ref":"#/components/schemas/Flows"}},"message_broker":{"$ref":"#/components/schemas/MessageBrokers"},"consumer_type":{"type":"string","enum":["queue","topic"]},"subscription_name":{"type":"string"},"flows_count":{"type":"integer"},"user":{"type":"object"}}},"FlowMessageBrokerQueue":{"type":"object","properties":{"id":{"type":"integer"},"flow_id":{"type":"integer"},"message_broker_id":{"type":"integer"},"message_broker_queue_id":{"type":"string"},"last_error":{"type":"string"},"name":{"type":"string"},"message_broker":{"type":"object"},"flow":{"type":"object"}}},"FlowNotificationGroup":{"type":"object","properties":{"flow_id":{"type":"integer"},"notification_group_id":{"type":"integer"}}},"ErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}},"MessageResponse":{"type":"object","properties":{"message":{"type":"string"}}},"FlowVersionsStoreSchedulesRequest":{"type":"object","properties":{"cron_string":{"type":"string"},"deployed_at":{"type":"string","format":"date-time","nullable":true}},"required":["cron_string"]}}},"paths":{"/api/v1/flow-versions/{flow_version}/schedules":{"post":{"summary":"Create Flow Version Schedule","description":"Creates a new schedule for a flow version using a `cron_string`.","parameters":[{"name":"flow_version","in":"path","required":true,"schema":{"type":"string"},"description":"The flow version identifier."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowVersionsResponse"}}}},"401":{"description":"Unauthenticated"},"403":{"description":"Unauthorized"},"404":{"description":"Not Found. The record does not exist.","content":{"application/json":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests. The rate limit for this user has been reached.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current minute.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowVersionsStoreSchedulesRequest"}}}},"tags":["Flow Versions"],"operationId":"flowVersionsSchedulesStore"}}}}
```

## Update Flow Version Schedule

> Updates the \`cron\_string\` for an existing flow version schedule.

```json
{"openapi":"3.0.0","info":{"title":"Patchworks Core API","version":"1.0.0"},"tags":[{"name":"Flow Versions"}],"servers":[{"url":"https://core.wearepatchworks.com"}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"API key passed in the Authorization header. Format: `<api-key>`"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2 Bearer token obtained from POST /fabric/api/login"}},"schemas":{"FlowVersionsResponse":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/FlowVersions"}}},"FlowVersions":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"virtual_environment_id":{"type":"string"},"flow_version_id":{"type":"string"},"priority":{"type":"integer"},"cron_string":{"type":"string"},"microservice":{"type":"string"},"config":{"type":"string"},"flow_step_route_id":{"type":"integer"},"variables":{"type":"array","items":{"$ref":"#/components/schemas/FlowVersionVariable"}},"parent_id":{"type":"integer"},"type":{"type":"string"},"key":{"type":"string"},"value":{"type":"string"},"date_format":{"type":"string"},"secret":{"type":"string"},"enabled_at":{"type":"string"},"created_at":{"type":"string","format":"date-time","items":{"type":"object"}},"updated_at":{"type":"string","format":"date-time","items":{"type":"object"}},"flow_id":{"type":"integer"},"flow_name":{"type":"string"},"flow_priority":{"type":"string"},"iteration":{"type":"integer"},"status":{"type":"string","enum":["Draft","Inactive","Deployed"]},"is_deployed":{"type":"boolean"},"is_editable":{"type":"boolean"},"deployed_at":{"type":"string","format":"date-time"},"deployed_by":{"type":"object"},"deployed_by_user":{"type":"object"},"deployments":{"type":"array","items":{"$ref":"#/components/schemas/FlowVersionDeployment"}},"has_callback_step":{"type":"boolean"},"steps":{"type":"array","items":{"$ref":"#/components/schemas/FlowSteps"}},"runs":{"type":"array","items":{"type":"object"}},"latest_run":{"type":"string"},"schedules":{"type":"array","items":{"type":"object"}},"filters":{"type":"array","items":{"type":"object"}},"steps_count":{"type":"array","items":{"type":"object"}},"pivot":{"type":"string"},"saved_at":{"type":"string","format":"date-time"},"saved_by":{"type":"string"},"saved_by_user":{"type":"object"}}},"FlowVersionVariable":{"type":"object","properties":{"id":{"type":"integer"},"type":{"type":"string","enum":["string","number","absolute date","relative date","boolean"]},"value":{"type":"string"},"key":{"type":"string"},"date_format":{"type":"string"},"secret":{"type":"boolean"}}},"FlowVersionDeployment":{"type":"object","properties":{"id":{"type":"integer"},"flow_version_id":{"type":"integer"},"flow_version":{"$ref":"#/components/schemas/FlowVersions"},"virtual_environment_id":{"type":"integer"},"virtual_environment":{"$ref":"#/components/schemas/VirtualEnvironments"},"enabled_by":{"type":"string"},"enabled_by_user":{"type":"object"},"enabled_at":{"type":"string","format":"date-time"},"package_id":{"type":"integer"},"package":{"$ref":"#/components/schemas/Packages"},"user_id":{"type":"integer"},"user":{"type":"object"},"priority":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"VirtualEnvironments":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"notes":{"type":"string"},"deployed_at":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string"},"name":{"type":"string","items":{"type":"object"}},"description":{"type":"string","items":{"type":"object"}},"type":{"type":"string","items":{"type":"object"},"enum":["LIVE","TEST"]},"deployments":{"type":"array","items":{"$ref":"#/components/schemas/FlowVersionDeployment"}},"versions":{"type":"array","items":{"$ref":"#/components/schemas/VirtualEnvironmentVersions"}},"versions_count":{"type":"integer"},"first_version":{"$ref":"#/components/schemas/VirtualEnvironmentVersions"},"deployed_version":{"$ref":"#/components/schemas/VirtualEnvironmentVersions"},"flows":{"type":"string"},"is_deployed":{"type":"boolean"},"deployments_count":{"type":"array","items":{"type":"object"}},"pivot":{"type":"array","items":{"type":"object"}},"package_deployments":{"type":"array","items":{"$ref":"#/components/schemas/PackageVirtualEnvironment"}},"labels":{"type":"array","items":{"$ref":"#/components/schemas/Labels"}}}},"VirtualEnvironmentVersions":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"flow_id":{"type":"string"},"priority":{"type":"integer"},"model_type":{"type":"string"},"original_model_id":{"type":"string"},"replacement_model_id":{"type":"string"},"type":{"type":"string"},"key":{"type":"string"},"value":{"type":"string"},"fallback":{"type":"string"},"date_format":{"type":"string"},"secret":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"version":{"type":"object"},"virtual_environment_id":{"type":"integer"},"virtual_environment":{"$ref":"#/components/schemas/VirtualEnvironments"},"status":{"type":"string","enum":["Draft","Inactive","Deployed"]},"deployed_at":{"type":"string","format":"date-time"},"deployed_by":{"type":"array","items":{"type":"object"}},"notes":{"type":"array","items":{"type":"object"}},"manifests":{"type":"array","items":{"$ref":"#/components/schemas/VirtualEnvironmentVersionManifest"}},"variables":{"type":"array","items":{"$ref":"#/components/schemas/VirtualEnvironmentVersionVariable"}},"counts":{"type":"string"},"user_id":{"type":"object"},"user":{"type":"object"}}},"VirtualEnvironmentVersionManifest":{"type":"object","properties":{"id":{"type":"integer"},"virtual_environment_version_id":{"type":"integer"},"virtual_environment_version":{"$ref":"#/components/schemas/VirtualEnvironmentVersions"},"model_type":{"type":"string"},"original_model_id":{"type":"integer"},"original_model":{},"replacement_model_id":{"type":"integer"},"replacement_model":{},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"VirtualEnvironmentVersionVariable":{"type":"object","properties":{"id":{"type":"integer"},"virtual_environment_version_id":{"type":"integer"},"type":{"type":"string"},"value":{"type":"string"},"fallback":{"type":"string"},"key":{"type":"string"},"date_format":{"type":"string"},"secret":{"type":"boolean"}}},"PackageVirtualEnvironment":{"type":"object","properties":{"user":{"type":"object"},"package":{"$ref":"#/components/schemas/Packages"}}},"Packages":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"name":{"type":"string"},"notes":{"type":"string"},"created_by":{"type":"string","items":{"type":"object"}},"priority":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"created_by_user":{"type":"object"},"flow_versions":{"type":"array","items":{"$ref":"#/components/schemas/FlowVersions"}},"virtual_environments":{"type":"array","items":{"$ref":"#/components/schemas/VirtualEnvironments"}},"deployments":{"type":"array","items":{"$ref":"#/components/schemas/PackageVirtualEnvironment"}},"flow_versions_count":{"type":"integer"},"deployments_count":{"type":"integer"},"flow_version_deployments_count":{"type":"integer"}}},"Labels":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier"},"colour":{"type":"string","enum":["blue","blue_inverted","cyan","cyan_inverted","gray","gray_inverted","green","green_inverted","orange","orange_inverted","pink","pink_inverted","purple","purple_inverted","red","red_inverted","yellow","yellow_inverted"]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"}}},"FlowSteps":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"first_step_id":{"type":"string"},"filter_logic_operator":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"flow_version_id":{"type":"integer"},"name":{"type":"string"},"microservice":{"type":"object","enum":["gateway","trigger","start","connector","pull","push","map","filter","route","script","manual-payload","assert-payload","split","batch","dedupe","cache","cache-set","cache-get","track","variable-set","run-flow","logging","events","notify","try-catch","branch","callback","data-transform","medium-processor","long-processor","scheduler","cross-reference"]},"config":{"type":"object"},"parent_id":{"type":"object"},"flow_version":{"$ref":"#/components/schemas/FlowVersions"},"children":{"type":"object"},"endpoint":{"$ref":"#/components/schemas/Endpoints"},"connector":{"$ref":"#/components/schemas/Connectors"},"data_pool":{"$ref":"#/components/schemas/DataPool"},"filters":{"type":"array","items":{"$ref":"#/components/schemas/Filters"}},"parent_flow_step":{"$ref":"#/components/schemas/FlowSteps"},"routes":{"type":"array","items":{"$ref":"#/components/schemas/FlowStepRoute"}},"variables":{"type":"array","items":{"$ref":"#/components/schemas/Variables"}},"script_version":{"$ref":"#/components/schemas/ScriptVersions"},"cache":{"$ref":"#/components/schemas/Caches"},"payloads":{"type":"array","items":{"$ref":"#/components/schemas/PayloadMetadata"}},"flow":{"$ref":"#/components/schemas/Flows"},"cross_references":{"type":"string"},"notes_count":{"type":"object"},"notification_group":{"type":"object"},"order":{"type":"string"}}},"Endpoints":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"field_path":{"type":"string"},"tags":{"type":"string"},"label":{"type":"string"},"key":{"type":"string"},"value":{"type":"string"},"secret":{"type":"string"},"variables":{"type":"array","items":{"$ref":"#/components/schemas/Variables"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"object"},"system_id":{"type":"integer"},"system":{"$ref":"#/components/schemas/Systems"},"entity_type_id":{"type":"integer"},"entity_type":{"$ref":"#/components/schemas/EntityType"},"endpoint":{"type":"string"},"http_method":{"type":"string","enum":["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"]},"data_type":{"type":"string","enum":["csv","json","txt","xml"]},"pagination_method":{"type":"string","enum":["Custom relative URI","Link Header","Next page token","Next Page URL","Page number parameter","Limit offset","default","PeopleVox","NetSuite SOAP","GraphQL Cursor","Database limit offset","Script"]},"deprecated_at":{"type":"string","format":"date-time"},"direction":{"type":"string","enum":["Send","Receive"]},"returns_multiple_records":{"type":"boolean"},"pre_script_version_id":{"type":"string"},"post_script_version_id":{"type":"string"},"endpoint_schema":{"$ref":"#/components/schemas/EndpointSchema"},"field_tags":{"type":"array","items":{"type":"object"}},"data_path":{"type":"array","items":{"type":"object"}},"body_format":{"type":"array","items":{"type":"object"},"enum":["none","form-data","raw","text"]},"raw_body":{"type":"array","items":{"type":"object"}},"filters":{"type":"array","items":{"$ref":"#/components/schemas/Filters"}},"modified":{"type":"array","items":{"type":"object"}},"help_link":{"type":"array","items":{"type":"object"}},"authentication_implementations":{"type":"array","items":{"$ref":"#/components/schemas/AuthenticationImplementations"}},"pre_script_version":{"$ref":"#/components/schemas/ScriptVersions"},"post_script_version":{"$ref":"#/components/schemas/ScriptVersions"},"disable_header_addition":{"type":"boolean"},"response_encoding":{"type":"string","enum":["base64","none"]}}},"Variables":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier"},"label":{"type":"string"},"key":{"type":"string"},"value":{"type":"string"},"secret":{"type":"boolean"},"locked":{"type":"boolean"},"configurable":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"modified":{"type":"string"},"pivot":{"type":"object"},"required":{"type":"boolean"},"advanced":{"type":"boolean"},"alias":{"type":"string"}}},"Systems":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"name":{"type":"string"},"entity_type_id":{"type":"integer"},"direction":{"type":"string","enum":["Send","Receive"]},"http_method":{"type":"string","enum":["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"]},"label":{"type":"string"},"colour":{"type":"string","enum":["blue","blue_inverted","cyan","cyan_inverted","gray","gray_inverted","green","green_inverted","orange","orange_inverted","pink","pink_inverted","purple","purple_inverted","red","red_inverted","yellow","yellow_inverted"]},"system_template_id":{"type":"integer"},"version":{"type":"integer"},"version_name":{"type":"string"},"system_type_id":{"type":"integer"},"protocol":{"type":"string","enum":["HTTP","FTP","SFTP","FTPS","S3","MySQL","PGSQL","SQLSRV","PUBLIC","OCI"]},"date_format":{"type":"string"},"help_link":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"rate_limit_unit":{"type":"string","enum":["second","minute","hour","day"]},"rate_limit_duration":{"type":"integer"},"endpoint":{"type":"string"},"method":{"type":"string"},"data_type":{"type":"string","enum":["csv","json","txt","xml"]},"body_format":{"type":"string","enum":["none","form-data","raw","text"]},"additional_endpoint_1":{"type":"string"},"additional_endpoint_2":{"type":"string"},"timeout":{"type":"integer"},"authentication_type_id":{"type":"string"},"returns_multiple_records":{"type":"string"},"pagination_method":{"type":"string","enum":["Custom relative URI","Link Header","Next page token","Next Page URL","Page number parameter","Limit offset","default","PeopleVox","NetSuite SOAP","GraphQL Cursor","Database limit offset","Script"]},"schema":{"type":"string"},"endpoint_template_id":{"type":"integer"},"data_path":{"type":"string"},"raw_body":{"type":"string"},"deprecated_at":{"type":"string"},"disable_header_addition":{"type":"string"},"response_encoding":{"type":"string","enum":["base64","none"]},"key":{"type":"string"},"value":{"type":"string"},"secret":{"type":"string"},"logo":{"$ref":"#/components/schemas/MediaFiles"},"pre_script_version_id":{"type":"string"},"post_script_version_id":{"type":"string"},"canonical_key":{"type":"array","items":{"type":"object"}},"connectors":{"type":"array","items":{"$ref":"#/components/schemas/Connectors"}},"system_type":{"$ref":"#/components/schemas/SystemType","enum":["Accounting","CRM","eCommerce","ERP","Marketplaces","Other","PIM","POS","3PL","WMS","Database"]},"system_template":{"$ref":"#/components/schemas/SystemTemplates"},"authentication_implementations":{"type":"array","items":{"$ref":"#/components/schemas/AuthenticationImplementations"}},"authentication_implementations_count":{"type":"array","items":{"type":"object"}},"endpoints":{"type":"array","items":{"$ref":"#/components/schemas/Endpoints"}},"variables":{"type":"array","items":{"$ref":"#/components/schemas/Variables"}},"updatable":{"type":"string"},"modified":{"type":"string"},"is_deployed":{"type":"boolean"}}},"MediaFiles":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"model_type":{"type":"string"},"model_id":{"type":"integer"},"file_name":{"type":"string"},"mime_type":{"type":"string"},"expires_at":{"type":"string","format":"date-time"},"is_expired":{"type":"boolean"}}},"Connectors":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"authentication_implementation_id":{"type":"integer"},"timezone":{"type":"string"},"date_format":{"type":"string"},"rate_limit_unit":{"type":"string","enum":["second","minute","hour","day"]},"rate_limit_duration":{"type":"integer"},"connection_pool_id":{"type":"integer"},"variables":{"type":"array","items":{"$ref":"#/components/schemas/Variables"}},"session_id":{"type":"string"},"platform_app_key":{"type":"string"},"certificate_id":{"type":"string"},"type":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"authentication_implementation":{"$ref":"#/components/schemas/AuthenticationImplementations"},"system":{"$ref":"#/components/schemas/Systems"},"certificate":{"$ref":"#/components/schemas/Certificates"}}},"AuthenticationImplementations":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"endpoint_ids":{"type":"string"},"label":{"type":"string"},"key":{"type":"string"},"value":{"type":"string"},"secret":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"endpoint":{"type":"string"},"method":{"type":"string"},"additional_endpoint_1":{"type":"string"},"additional_endpoint_2":{"type":"string"},"authentication_type_id":{"type":"integer"},"authentication_implementation_template_id":{"type":"integer"},"authentication_type":{"$ref":"#/components/schemas/AuthenticationType"},"system_id":{"type":"integer"},"body_format":{"type":"string","enum":["none","form-data","raw","text"]},"data_type":{"type":"string","enum":["csv","json","txt","xml"]},"pre_script_version_id":{"type":"string"},"post_script_version_id":{"type":"string"},"timeout":{"type":"integer"},"system":{"$ref":"#/components/schemas/Systems"},"variables":{"type":"array","items":{"$ref":"#/components/schemas/Variables"}},"endpoints":{"type":"array","items":{"$ref":"#/components/schemas/Endpoints"}},"pre_script_version":{"$ref":"#/components/schemas/ScriptVersions"},"post_script_version":{"$ref":"#/components/schemas/ScriptVersions"},"modified":{"type":"string"},"help_link":{"type":"string"},"disable_token_url_parameters":{"type":"boolean"}}},"AuthenticationType":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"label":{"type":"string"},"is_enabled":{"type":"boolean"},"hidden":{"type":"boolean"},"protocol":{"type":"string","enum":["HTTP","FTP","SFTP","FTPS","S3","MySQL","PGSQL","SQLSRV","PUBLIC","OCI"]}}},"ScriptVersions":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"script_id":{"type":"string"},"name":{"type":"string"},"version":{"type":"integer"},"status":{"type":"string","enum":["Draft","Inactive","Deployed"]},"deployment_failure_reason":{"type":"string"},"last_invoked_on":{"type":"string"},"deployed_at":{"type":"string","format":"date-time"},"deployment_failed_at":{"type":"string","format":"date-time"},"deploying":{"type":"boolean"},"content":{"type":"object"},"script":{"$ref":"#/components/schemas/Scripts"},"deployment_failure_detail":{"type":"string"},"is_draft":{"type":"boolean"}}},"Scripts":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier"},"script_template_id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string","items":{"type":"object"}},"language":{"type":"string","items":{"type":"object"},"enum":["c_sharp_8_0","go_1_18","go_1_23","go_1_26","rust_1_82","rust_1_94","node_18","node_20","node_22","node_24","php_8_1","php_8_2","php_8_3","php_8_4","php_8_5","python_3","mcp","ruby_3"]},"created_at":{"type":"string"},"updated_at":{"type":"string","format":"date-time"},"script_id":{"type":"integer"},"version":{"type":"string"},"deployed_at":{"type":"string"},"deployment_failed_at":{"type":"string"},"deploying":{"type":"string"},"deployment_failure_reason":{"type":"string"},"content":{"type":"string"},"ai_created":{"type":"boolean"},"value":{"type":"string"},"versions":{"type":"array","items":{"$ref":"#/components/schemas/ScriptVersions"}},"latest_version":{"$ref":"#/components/schemas/ScriptVersions"},"type":{"type":"string","enum":["custom","pre_auth","post_auth","pre_request","post_request","pagination"]},"updated_by":{"type":"string"},"updated_by_user":{"type":"string"},"versions_count":{"type":"integer"},"versions_remaining":{"type":"string"},"max_versions":{"type":"string"},"unlimited_versions":{"type":"boolean"}}},"Certificates":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"connector_id":{"type":"integer"},"certificate":{"type":"string"},"passphrase":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"object"},"user_id":{"type":"object"},"connector":{"$ref":"#/components/schemas/Connectors"},"user":{"type":"object"},"message_broker_id":{"type":"integer"}}},"SystemType":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"label":{"type":"string"},"system_templates":{"type":"array","items":{"$ref":"#/components/schemas/SystemTemplates"}}}},"SystemTemplates":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"label":{"type":"string"},"colour":{"type":"string","enum":["blue","blue_inverted","cyan","cyan_inverted","gray","gray_inverted","green","green_inverted","orange","orange_inverted","pink","pink_inverted","purple","purple_inverted","red","red_inverted","yellow","yellow_inverted"]},"logo_url":{"type":"string"},"version":{"type":"integer"},"version_name":{"type":"string"},"rate_limit_unit":{"type":"string","enum":["second","minute","hour","day"]},"protocol":{"type":"object","enum":["HTTP","FTP","SFTP","FTPS","S3","MySQL","PGSQL","SQLSRV","PUBLIC","OCI"]},"rate_limit_duration":{"type":"integer"},"system_type_id":{"type":"integer"},"system_type":{"$ref":"#/components/schemas/SystemType","enum":["Accounting","CRM","eCommerce","ERP","Marketplaces","Other","PIM","POS","3PL","WMS","Database"]},"date_format":{"type":"string"},"canonical_key":{"type":"object"},"company_id":{"type":"object"},"public_company_id":{"type":"object"},"company":{"type":"object"},"public_company":{"type":"object"},"logo":{"$ref":"#/components/schemas/MediaFiles"},"instances":{"type":"array","items":{"type":"object"}},"authentication_implementation_templates":{"type":"array","items":{"type":"object"}},"marketplace_company_id":{"type":"object"},"marketplace_company":{"type":"object"},"help_link":{"type":"string"}}},"EntityType":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"label":{"type":"string"}}},"EndpointSchema":{"type":"object","properties":{"id":{"type":"integer"},"endpoint_id":{"type":"integer"},"endpoint":{"$ref":"#/components/schemas/Endpoints"},"schema":{"type":"string"}}},"Filters":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"type":{"type":"string","enum":["string","string_length","number","absolute date","relative date","XPath","boolean","null","variable","array","array_length"]},"comparison":{"type":"string","enum":[">","<","==","<=",">=","!=","*","!*","NOT NULL","IS NULL","*[]","!*[]","regex"]},"value":{"type":"string"},"value_type":{"type":"string","enum":["string","integer","float","boolean","date"]},"keep_matching":{"type":"boolean"},"operator_logic":{"type":"string","enum":["and","or"]},"match_order":{"type":"boolean"},"is_default":{"type":"boolean"},"location":{"type":"string","enum":["header","body","url"]},"model_type":{"type":"string"},"model_id":{"type":"integer"},"date_format":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"field":{"type":"string"},"is_active":{"type":"boolean"}}},"DataPool":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"name":{"type":"string"},"description":{"type":"string"},"data_pool_template_id":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"FlowStepRoute":{"type":"object","properties":{"id":{"type":"integer"},"flow_step_id":{"type":"integer"},"name":{"type":"string"},"first_step_id":{"type":"integer"},"filter_logic_operator":{"type":"string","enum":["and","or"]},"filters":{"type":"array","items":{"$ref":"#/components/schemas/Filters"}},"first_step":{"$ref":"#/components/schemas/FlowSteps"},"order":{"type":"string"}}},"Caches":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"scope":{"type":"string","enum":["Flow run","Flow","Company"]},"ttl":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"flow_id":{"type":"integer"},"cache_template_id":{"type":"integer"},"content":{"type":"string"},"ttl_unit":{"type":"string"},"ttl_number":{"type":"string"},"flow":{"type":"object"}}},"PayloadMetadata":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"flow_version_id":{"type":"integer"},"flow_step_id":{"type":"integer"},"flow_run_id":{"type":"string"},"payload_store_reference":{"type":"string"},"payload_size":{"type":"string"},"dropped":{"type":"boolean"}}},"Flows":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"name":{"type":"string"},"enabled_at":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["Draft","Inactive","Deployed"]},"format":{"type":"string","enum":["csv","json","txt","xml"]},"body":{"type":"string"},"deployed_at":{"type":"string"},"labels":{"type":"array","items":{"$ref":"#/components/schemas/Labels"}},"notification_groups":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"description":{"type":"string"},"layout_direction":{"type":"string"},"is_enabled":{"type":"boolean"},"latest_version":{"$ref":"#/components/schemas/FlowVersions"},"current_version":{"$ref":"#/components/schemas/FlowVersions"},"deployed_version":{"$ref":"#/components/schemas/FlowVersions"},"latest_deployed_version":{"$ref":"#/components/schemas/FlowVersions"},"versions":{"type":"array","items":{"$ref":"#/components/schemas/FlowVersions"}},"version_type_counts":{"type":"array","items":{"type":"object"}},"message_brokers":{"type":"array","items":{"$ref":"#/components/schemas/MessageBrokers"}},"message_broker_queues":{"type":"array","items":{"$ref":"#/components/schemas/MessageBrokerQueues"}},"notification_group_ids":{"type":"array","items":{"$ref":"#/components/schemas/FlowNotificationGroup"}},"webhooks":{"type":"array","items":{"type":"object"}},"callbacks":{"type":"array","items":{"type":"object"}},"current_version_step_count":{"type":"integer"},"current_version_connector_count":{"type":"integer"},"current_version_script_count":{"type":"integer"},"current_version_cache_count":{"type":"integer"},"current_version_data_pool_count":{"type":"integer"},"current_version_cross_ref_count":{"type":"integer"},"use_queued_time":{"type":"boolean"},"remove_failed_payloads":{"type":"boolean"},"priority":{"type":"array","items":{"type":"object"}},"prod_flag":{"type":"boolean"},"deployments":{"type":"array","items":{"$ref":"#/components/schemas/FlowVersionDeployment"}},"webhooks_count":{"type":"integer"},"callbacks_count":{"type":"integer"},"marketplace_app_id":{"type":"integer"},"blueprint_id":{"type":"integer"},"blueprint_version_number":{"type":"string"},"flow_folder_id":{"type":"integer"},"flow_message_broker_queues":{"type":"array","items":{"$ref":"#/components/schemas/FlowMessageBrokerQueue"}},"max_concurrency":{"type":"integer"}}},"MessageBrokers":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier"},"description":{"type":"string"},"host":{"type":"string","items":{"type":"object"}},"port":{"type":"integer","items":{"type":"object"}},"protocol":{"type":"string","enum":["AMQP-0-9-1","AMQP 1.0","IBM MQ","MQTT","STOMP"],"items":{"type":"object"}},"auth_type":{"type":"string","items":{"type":"object"},"enum":["Basic","x.509 Certificate"]},"variables":{"type":"array","items":{"$ref":"#/components/schemas/Variables"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"string"},"flows":{"type":"array","items":{"$ref":"#/components/schemas/Flows"}},"message_broker_queues":{"type":"array","items":{"$ref":"#/components/schemas/MessageBrokerQueues"}},"message_broker_queues_count":{"type":"array","items":{"type":"object"}},"flow_message_broker_queues":{"type":"array","items":{"$ref":"#/components/schemas/FlowMessageBrokerQueue"}},"certificate":{"$ref":"#/components/schemas/Certificates"}}},"MessageBrokerQueues":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier"},"flow_id":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"name":{"type":"array","items":{"type":"object"}},"message_broker_id":{"type":"integer"},"flows":{"type":"array","items":{"$ref":"#/components/schemas/Flows"}},"message_broker":{"$ref":"#/components/schemas/MessageBrokers"},"consumer_type":{"type":"string","enum":["queue","topic"]},"subscription_name":{"type":"string"},"flows_count":{"type":"integer"},"user":{"type":"object"}}},"FlowMessageBrokerQueue":{"type":"object","properties":{"id":{"type":"integer"},"flow_id":{"type":"integer"},"message_broker_id":{"type":"integer"},"message_broker_queue_id":{"type":"string"},"last_error":{"type":"string"},"name":{"type":"string"},"message_broker":{"type":"object"},"flow":{"type":"object"}}},"FlowNotificationGroup":{"type":"object","properties":{"flow_id":{"type":"integer"},"notification_group_id":{"type":"integer"}}},"ErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}},"MessageResponse":{"type":"object","properties":{"message":{"type":"string"}}},"FlowVersionsUpdateSchedulesRequest":{"type":"object","properties":{"cron_string":{"type":"string"},"deployed_at":{"type":"string","format":"date-time","nullable":true}}}}},"paths":{"/api/v1/flow-versions/{flow_version}/schedules/{schedule}":{"put":{"summary":"Update Flow Version Schedule","description":"Updates the `cron_string` for an existing flow version schedule.","parameters":[{"name":"flow_version","in":"path","required":true,"schema":{"type":"string"},"description":"The flow version identifier."},{"name":"schedule","in":"path","required":true,"schema":{"type":"string"},"description":"The schedule identifier."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowVersionsResponse"}}}},"401":{"description":"Unauthenticated"},"403":{"description":"Unauthorized"},"404":{"description":"Not Found. The record does not exist.","content":{"application/json":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests. The rate limit for this user has been reached.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current minute.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowVersionsUpdateSchedulesRequest"}}}},"tags":["Flow Versions"],"operationId":"flowVersionsSchedulesUpdate"}}}}
```

## Delete Flow Version Schedule

> Permanently deletes a specific flow version schedule.

```json
{"openapi":"3.0.0","info":{"title":"Patchworks Core API","version":"1.0.0"},"tags":[{"name":"Flow Versions"}],"servers":[{"url":"https://core.wearepatchworks.com"}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"API key passed in the Authorization header. Format: `<api-key>`"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2 Bearer token obtained from POST /fabric/api/login"}},"schemas":{"MessageResponse":{"type":"object","properties":{"message":{"type":"string"}}}}},"paths":{"/api/v1/flow-versions/{flow_version}/schedules/{schedule}":{"delete":{"summary":"Delete Flow Version Schedule","description":"Permanently deletes a specific flow version schedule.","parameters":[{"name":"flow_version","in":"path","required":true,"schema":{"type":"string"},"description":"The flow version identifier."},{"name":"schedule","in":"path","required":true,"schema":{"type":"string"},"description":"The schedule identifier."}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"401":{"description":"Unauthenticated"},"403":{"description":"Unauthorized"},"404":{"description":"Not Found. The record does not exist.","content":{"application/json":{"schema":{"type":"string"}}}},"429":{"description":"Too Many Requests. The rate limit for this user has been reached.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current minute.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}}},"tags":["Flow Versions"],"operationId":"flowVersionsSchedulesDestroy"}}}}
```

## Update Flow Version Graph Step

> Updates a specific canvas step for a specific flow version.

```json
{"openapi":"3.0.0","info":{"title":"Patchworks Core API","version":"1.0.0"},"tags":[{"name":"Flow Versions"}],"servers":[{"url":"https://core.wearepatchworks.com"}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"API key passed in the Authorization header. Format: `<api-key>`"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2 Bearer token obtained from POST /fabric/api/login"}},"schemas":{"ErrorResponse":{"type":"object","properties":{"message":{"type":"string"},"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}},"MessageResponse":{"type":"object","properties":{"message":{"type":"string"}}}}},"paths":{"/api/v1/flow-versions/{flow_version}/graph/steps/{step}":{"patch":{"summary":"Update Flow Version Graph Step","description":"Updates a specific canvas step for a specific flow version.","responses":{"200":{"description":"OK"},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"type":"string"}}}},"403":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"string"}}}},"404":{"description":"Not Found. The record does not exist.","content":{"application/json":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests. The rate limit for this user has been reached.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current minute.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}}},"tags":["Flow Versions"],"parameters":[{"name":"step","in":"path","required":true,"schema":{"type":"string"},"description":"The step identifier."},{"name":"flow_version","in":"path","required":true,"schema":{"type":"string"},"description":"The flow version identifier."}],"operationId":"flowVersionGraphUpdateStep"}}}}
```

## List Flow Version Health Check

> \## Description\
> \
> Check a flow version for configuration problems that would stop it running as expected.

```json
{"openapi":"3.0.0","info":{"title":"Patchworks Core API","version":"1.0.0"},"tags":[{"name":"Flow Versions"}],"servers":[{"url":"https://core.wearepatchworks.com"}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"API key passed in the Authorization header. Format: `<api-key>`"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth 2 Bearer token obtained from POST /fabric/api/login"}},"schemas":{"MessageResponse":{"type":"object","properties":{"message":{"type":"string"}}}}},"paths":{"/api/v1/flow-versions/{flow_version}/health-check":{"get":{"summary":"List Flow Version Health Check","description":"## Description\n\nCheck a flow version for configuration problems that would stop it running as expected.","parameters":[{"name":"flow_version","in":"path","required":true,"schema":{"type":"string"},"description":"The flow version identifier."}],"responses":{"200":{"description":"OK"},"401":{"description":"Unauthenticated","content":{"application/json":{"schema":{"type":"string"}}}},"403":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"string"}}}},"404":{"description":"Not Found. The record does not exist.","content":{"application/json":{"schema":{"type":"string"}}}},"429":{"description":"Too Many Requests. The rate limit for this user has been reached.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per minute.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests left in the current minute.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}}},"tags":["Flow Versions"],"operationId":"flowVersionsHealthCheck"}}}}
```
