CreateSpecRequest
Payload to create or update a file spec
Unique human-readable name for the spec
acme-payments-v2Optional description of what this spec represents
ACME Corp daily payment file, pipe-delimitedSemantic version of the spec
1.02.0Supported file formats
Possible values: [CSV, FIXED_WIDTH, XML, JSON, NACHA, ISO20022, SWIFT_MT, DELIMITED, CUSTOM]
DELIMITEDCharacter encoding of the source file
UTF-8UTF-8Whether the first data row is a header row (CSV/delimited)
falseField separator character (CSV/DELIMITED only)
|Number of lines to skip at the top of the file (e.g. file-level header)
02fields object[]
Ordered list of field definitions
Internal field identifier (snake_case recommended)
account_numberHuman-readable label (defaults to name)
Account NumberData type for a field
Possible values: [STRING, INTEGER, LONG, DECIMAL, AMOUNT, DATE, DATETIME, BOOLEAN, ALPHANUMERIC, ROUTING_NUMBER, ACCOUNT_NUMBER, ABA, ENUM]
AMOUNT1-based character start position (fixed-width only)
1Field length in characters (fixed-width only)
170-based column index (CSV/delimited without header)
0Column header name (CSV/delimited with hasHeader: true)
ACCT_NOXPath (XML) or JSONPath (JSON) expression
$.payment.accountNumberXML attribute name (XML only)
Whether the field must be present
trueWhether an empty/null value is acceptable
falseValue to use when field is absent or null
Date/number format pattern (e.g. yyyyMMdd, #,##0.00)
yyyyMMddDecimal places for AMOUNT/DECIMAL fields
2Regular expression the field value must match
^[0-9]{9}$Minimum string length
Maximum string length
17Whitelist of accepted values
PII flag — value will be masked in logs and traces
falseOptional documentation for this field
validationRules object[]
Post-parse validation rules
Unique identifier for this rule within the spec
vr-001Name of the field this rule applies to
amountType of validation rule
Possible values: [NOT_NULL, NOT_EMPTY, MIN_LENGTH, MAX_LENGTH, EXACT_LENGTH, REGEX, MIN_VALUE, MAX_VALUE, BETWEEN, ALLOWED_VALUES, CUSTOM_EXPRESSION, CROSS_FIELD]
MIN_VALUEPrimary comparison value (e.g. min value, regex pattern, allowed list)
0Upper bound for BETWEEN rules
999999Human-readable error message when the rule fails
Amount must be non-negativeSeverity level of a validation error
Possible values: [INFO, WARNING, ERROR, FATAL]
ERRORcorrectionRules object[]
Auto-correction rules applied before/after validation
Unique identifier for this rule within the spec
cr-001Name of the field to correct
account_numberType of auto-correction to apply
Possible values: [TRIM, TRIM_LEADING, TRIM_TRAILING, UPPERCASE, LOWERCASE, TITLE_CASE, DATE_FORMAT_COERCE, NUMBER_FORMAT_COERCE, DEFAULT_IF_NULL, DEFAULT_IF_EMPTY, PAD_LEFT, PAD_RIGHT, REMOVE_SPECIAL_CHARS, REGEX_REPLACE]
TRIMCorrection parameter (e.g. default value, replacement string, pad character)
0Execution order when multiple corrections apply to the same field (lower = first)
01outputSpec object
Describes the output format when transforming from one file format to another
Supported file formats
Possible values: [CSV, FIXED_WIDTH, XML, JSON, NACHA, ISO20022, SWIFT_MT, DELIMITED, CUSTOM]
DELIMITEDField delimiter for delimited output formats
,UTF-8UTF-8Whether to write a header row
falsefieldMappings object[]
Field-level mapping and transformation rules
Name of the field in the input spec
account_numberName of the field in the output spec
accountNoOptional SpEL expression to transform the value
#value.substring(0, 9)metadata object
Arbitrary key-value metadata (owner, environment, tags, etc.)
{
"name": "acme-payments-v2",
"description": "ACME Corp daily payment file, pipe-delimited",
"version": "2.0",
"format": "DELIMITED",
"encoding": "UTF-8",
"hasHeader": false,
"delimiter": "|",
"skipLinesCount": 2,
"fields": [
{
"name": "account_number",
"displayName": "Account Number",
"type": "AMOUNT",
"startPosition": 1,
"length": 17,
"columnIndex": 0,
"columnName": "ACCT_NO",
"path": "$.payment.accountNumber",
"xmlAttribute": "string",
"required": true,
"nullable": false,
"defaultValue": "string",
"format": "yyyyMMdd",
"scale": 2,
"validationRegex": "^[0-9]{9}$",
"minLength": 0,
"maxLength": 17,
"allowedValues": [
"string"
],
"sensitive": false,
"description": "string"
}
],
"validationRules": [
{
"ruleId": "vr-001",
"field": "amount",
"ruleType": "MIN_VALUE",
"value": "0",
"secondaryValue": "999999",
"message": "Amount must be non-negative",
"severity": "ERROR"
}
],
"correctionRules": [
{
"ruleId": "cr-001",
"field": "account_number",
"correctionType": "TRIM",
"value": "0",
"applyOrder": 1
}
],
"outputSpec": {
"format": "DELIMITED",
"delimiter": ",",
"encoding": "UTF-8",
"hasHeader": false,
"fieldMappings": [
{
"sourceField": "account_number",
"targetField": "accountNo",
"transformation": "#value.substring(0, 9)"
}
]
},
"metadata": {
"owner": "payments-team",
"environment": "production"
}
}